tags:

views:

125

answers:

1

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 ?

+1  A: 

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

Alex
Yes, i get into the source and i think you ar right. Thx.
PeterMmm