Including Lua code
Markup:
<% code %>
Writing variables and function values
Syntax:
<% write (value) %>
Short-Markup:
<%=value%>
Including templates
Syntax:
<% include (templatename) %>
Short-Markup:
<%+templatename%>
Translating
Syntax:
<% translate (translation_key, default_translation) %>
Short-Markup:
<%:translation_key default_translation%>
Commenting
Markup:
<%# comment %>
Builtin constants
Name
Value
REQUEST_URI
The current URL (without server part)
controller
Path to the Luci main dispatcher
resource
Path to the resource directory
media
Path to the active theme directory
本文介绍了一种使用Lua脚本语言的标记语法,包括代码插入、变量写入、模板包含及翻译功能等。此外还介绍了内置常量的用途,如获取当前URL等。
2241

被折叠的 条评论
为什么被折叠?



