简体   繁体   中英

Lua template processor question

I'm going to use that template engine LTP . There is not so much doc available.

Now i'm stuck how to pass an environment into the render engine. I have basically this:

local ltp = require("ltp.template")
ltp.render(io.stdout, 1, "index.dhtm", false, {}, "<?lua", "?>", { total="2400" })

What data structure should be the last parameter (env_code), a string, a table with key=val ?

I think it's an array of string. each string should be in key=value form.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM