数字化技能提升教程,数字化时代生存宝典

数字化百科 / 词条 / TWiki模板

TWiki模板

查看全部词条命名空间:Main

TWiki模板就是一些嵌入了模板指令的静态文本,这些指令告诉TWiki如何组织文本块或者是创建新的。

TWiki的模板分为两种:


  • Master Templates: 定义了显示TWiki的页面所使用的HTML

  • Template Topics: 定义了创建新的Topic的默认文本。


关于TWiki模板详细的英文说明在安装的TWiki中已经自带了,在 TWiki/TWikiTemplates

Master Templates

# Directives are of the form %TMPL:% and %TMPL:{"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

category:TWiki