mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-27 11:26:22 -07:00
Push gctemplates module table to the stack in preload function
This commit is contained in:
parent
ea37e22ea6
commit
c26b7e9e1d
2 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
-- testing manage page registering from Lua plugins
|
||||
local strings = require("strings")
|
||||
local gctemplates = require("gctemplates")
|
||||
local manage = require("manage")
|
||||
local serverutil = require("serverutil")
|
||||
|
||||
|
@ -18,7 +19,7 @@ manage.register_manage_page("templateplugintest",
|
|||
"Template Plugin Testing",
|
||||
3, 0,
|
||||
function(writer, request, staff, wantsJSON, infoEv, errEv)
|
||||
local tmpl, err = parse_template("parse_template_test",
|
||||
local tmpl, err = gctemplates.parse_template("parse_template_test",
|
||||
[[<b>Staff: </b> {{.staff.Username}}<br/>
|
||||
This manage page rendered from a template provided by a Lua plugin]])
|
||||
if(err ~= nil) then
|
||||
|
|
|
@ -28,6 +28,6 @@ func PreloadModule(l *lua.LState) int {
|
|||
return 1
|
||||
},
|
||||
})
|
||||
|
||||
l.Push(t)
|
||||
return 1
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue