当前位置:首页 > 未命名

zblogPHP侧边栏规则和判断方法

8976988823个月前 (01-10)未命名4

zblogphp1.6版本之前的侧边栏都只有5个,即{template:sidebar}、{template:sidebar2}、{template:sidebar3}、{template:sidebar4}、{template:sidebar5}

在模块管理中分别对应默认侧栏、侧栏2、侧栏3、侧栏4、侧栏5

zblogPHP1.6版本新增了几个增加到了9个侧边栏,大大丰富了各种cms和专题页面的侧栏可能性,如何对不同类型的页面判断为不同的侧边栏,其实也很简单

{if $type=='index'}     {template:sidebar} {elseif $type=='category'}      {template:sidebar2} {elseif $type=='article'}     {template:sidebar3} {elseif $type=='page'}     {template:sidebar4} {else}     {template:sidebar5} {/if}


扫描二维码推送至手机访问。

版权声明:本文由米表程序发布,如需转载请注明出处。

本文链接:https://www.9909999.xyz/post/55.html

分享给朋友: