TWiki模板:修订间差异
来自站长百科
(新页面: '''TWiki模板'''就是一些嵌入了模板指令的静态文本,这些指令告诉TWiki如何组织文本块或者是创建新的。 TWiki的模板分为两种: *Master Templat...) |
|||
第9行: | 第9行: | ||
== Master Templates == | == Master Templates == | ||
# Directives are of the form %TMPL:<key>% and %TMPL:<key>{"attr"}%. | |||
# Directives: | |||
* %TMPL:INCLUDE{"file"}%: Includes a template file. The file is found as described below. | |||
* %TMPL:DEF{"block"}%: Define a block. All text between this and the next %TMPL:END% directive is removed and saved for later use with %TMPL:P. | |||
* %TMPL:END%: Ends a block definition. | |||
* %TMPL:P{"var"}%: Includes a previously defined block. | |||
* %{...}%: is a comment. | |||
== Template Topics == | == Template Topics == |
2009年9月3日 (四) 18:11的最新版本
TWiki模板就是一些嵌入了模板指令的静态文本,这些指令告诉TWiki如何组织文本块或者是创建新的。
TWiki的模板分为两种:
- Master Templates: 定义了显示TWiki的页面所使用的HTML
- Template Topics: 定义了创建新的Topic的默认文本。
关于TWiki模板详细的英文说明在安装的TWiki中已经自带了,在 TWiki/TWikiTemplates
Master Templates[ ]
- Directives are of the form %TMPL:<key>% and %TMPL:<key>{"attr"}%.
- Directives:
- %TMPL:INCLUDE{"file"}%: Includes a template file. The file is found as described below.
- %TMPL:DEF{"block"}%: Define a block. All text between this and the next %TMPL:END% directive is removed and saved for later use with %TMPL:P.
- %TMPL:END%: Ends a block definition.
- %TMPL:P{"var"}%: Includes a previously defined block.
- %{...}%: is a comment.