35dir系统主要采用Smarty作为模板引擎,标签的左/右结束符可通过 “source/include/smarty.php”文件来修改,可修改为你自己喜欢的方式,系统默认使用“{#”和“#}”来表示标签的开始和结束,例如:{#$变量名#}。升级Smarty模板引擎只需下载最新的版本,覆盖“source/extend/smarty”目录下的文件即可。对于不熟悉Smarty模板引擎的朋友,可参考Smarty相关使用手册。
一、网站首页(index.html)
可使用上面的所有标签及函数。
二、目录列表页专用标签(directory.html)
$category_name --------- 当前分类名称
$child_category -------- (数组格式)当前分类下的子分类
使用示例:
{#$category_name#}
{#foreach from=$child_category item=c#}
{#if $cate_id == $c.cate_id#}
{#$c.cate_name#} ({#$c.cate_postcount#})
{#else#}
{#$c.cate_name#} ({#$c.cate_postcount#})
{#/if#}
{#/foreach#}
循环体中可使用的字段:
$cate_id -------------- 分类ID
$cate_name ------------ 分类名称
$cate_postcount ------- 分类下的内容统计
$cate_link ------------ 分类链接
三、最近更新页专用标签(update.html)
$days ----------------- 当前选择的时间周期
$timescope ------------ (数组格式)时间范围
使用示例:
{#foreach from=$timescope item=v key=k#}
{#if $days == $v.time_id#}
{#$v.time_text#}
{#else#}
{#$v.time_text#}
{#/if#}
{#/foreach#}
循环体中可使用的字段:
$time_id -------------- 时间周期,例如:24小时,3天内,1周内
$time_text ------------ 时间名称
$time_link ------------ 时间链接