{* Template Name:xxx *} 
放在模板文件第一行,xxx表示模板名。
模板名和模板类型同时出现
{* Template Name:xxx * Template Type:yyyy *} 
放在模板文件第一行,xxx表示模板名,yyyy表示模板类型
类型有:list,single,article,page,category,tag,author,date,404,search
^ 类型      ^ 意义        ^
| list      |  列表页面      |
| single    |  单页面(含文章与页面)|
| article   |  文章          |
| page      |  页面          |
| category  |  分类列表      |
| tag       |  标签列表      |
| author    |  作者列表      |
| date      |  日期列表      |
| search    |  搜索          |
| 404       |  404           |
| index     |  首页(非列表页)  |
| none      |  未分类(不显示)  |
示例1
{* Template Name:文章模板 * Template Type:single *} 
示例2
{* Template Name:作者列表模板 * Template Type:list,author *} 
{
    "id": "主题ID",
    "templates": [
        {
            "filename": "index",
            "type": "list",
            "name": "列表自动模板"
        },
        {
            "filename": "single",
            "type": "single",
            "name": "文章/单页自动模板"
        }
    ]
}
{template:hearder}
即嵌入模板文件''hearder.php''的文件内容。这里''hearder''只是举例,''{template:abc}''即可嵌入''abc.php''文件内容。
==== 嵌入模块内容 ====
{module:xxxxxx}
xxxxxx为模块的filename,这里所说的filename即在模块编辑时看到的**文件名**。
===== 2.访问并输出变量或定义变量 =====
==== 直接输出 ====
{$abc}
如输出文章($article)对象的Title属性值:
{$article.Title}
注意:''$article''等在特定页面是作为特定实体对象存在的,如在文章页需要使用''getlist''等获取文章列表时请勿使用article作为别名。
==== 定义变量并赋值 ====
只定义赋值,并不输出内容
{$now=time()}
{$abc="my name"}
若要输出变量内容,代码同上一条所述
{$now}
{$abc}
{#ZC_BLOG_HOST#}
这是zblog传统的常量型,和asp版语法基本一致
===== 4.if判断语句 =====
{if $i==1}
{elseif $i==2}
{else}
{/if}
===== 5.foreach和for遍历语句 =====
==== foreach ====
{foreach $articles as $post}
  {$post.Title}
{/foreach}
==== for ====
{for $i  =  1 ;  $i  <=  10 ;  $i ++}
  这是第{$i}次?
{/for}
===== 6.函数调用 =====
==== 直接输出 ====
如,直接输出当前时间
{time()}
==== 返回数组 ====
举例,输出[[zblogphp:development:functions:getlist|GetList]]()的返回数组
{foreach GetList() as $post}
{$post.***}
{/foreach}
更多由Z-BlogPHP提供的可用函数请参考:[[zblogphp:development:functions:首页]]
===== 7.注释 =====
{* 这里是注释 *}
===== 8.直接运行PHP代码 =====
{php}
  global $actions;
  print_r($actions);
  echo '12345';
{/php}