开发者

Lua template processor question

开发者 https://www.devze.com 2022-12-30 07:50 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消