mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
added template.render function
This commit is contained in:
parent
fc3d065180
commit
30bf1e5589
2 changed files with 13 additions and 2 deletions
|
|
@ -43,4 +43,12 @@ function template.gen(template_file, context, is_full_path)
|
|||
return template.compile(path, nil, nil)(context)
|
||||
end
|
||||
|
||||
---Print the template inside the requested page
|
||||
---@param template_file string The template file to render
|
||||
---@param context table The data used by the page template
|
||||
---@param is_full_path boolean Is an absolute path?
|
||||
function template.render(template_file, context, is_full_path)
|
||||
print(template.gen(template_file, context, is_full_path))
|
||||
end
|
||||
|
||||
return template
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue