有时候频道很多,每个频道页面单独制作模版很麻烦,但是又想自动获取本频道下子栏目及连接,那么你就需要这个了。
代码如下:
<?
$bclassid = $class_r[$GLOBALS[navclassid]][bclassid]; //获取当前父栏目ID
?>
[e:loop={"select classid,classname,classpath from [!db.pre!]enewsclass where bclassid = ‘$bclassid’ order by classid”,0,24,0}]
<?
$bqno%2==0?$style=”style=background:#E8E8E8;”:$style=”";
?>
<tr>
<td width=”346″ height=”25″ valign=”top”><table w...
列表内容模板(list.var) (*)
选中:使用程序代码
内容修改为:
$listtemp=’<li><a href=”[!--titleurl--]” title=”[!--oldtitle--]“>[!--title--]</a> <span>’.date(“Y”,$r[newstime]).’年’.date(“m”,$r[newstime]).’月’.date(“d”,$r[newstime]).’日</span>
</li>’;
其中这部分就是我开始想要的:
‘.date(“Y”,$r[newstime]).’年
‘.date(“m”,$r[newstime]).’月
‘.date(“d”,$r[newstime]).’日
...