织梦channel属性currentstyle不好用怎么回事
I..首
更多精彩就在: 51免费论文网|www.jxszl.com
先给出大家列出误认为正确的解决在top=‘son’type=xx(指定ID)时候的channel属性currentstyle不好用的方法
代码如下:
{dede:type=sontypeid=I.IIcurrentstyle="
{/dede:channel}
解决的办法:把typeid=‘I.II’改为channel=‘I.’(文章模型id),首页除外,其他页面不需要指定typeid=xx,会自动判断当前位置.
解决方法如下:
{dede:type=sonchannel=I.currentstyle="
{/dede:channel}
我经过经测试这种在top=‘son’type=xx(指定ID)时候的调用方式currentstyle根本不好用,简直是扯淡.
II.解决channel属性currentstyle在top=‘son’type=xx(指定ID)时候不好用的正确方法
修改include/taglib/channel.lib.php
把
if(($row[id]==$typeid||($topid==$row[id]&&$type==top))&&$currentstyle!=)
改成
if(($row[id]==$refObj->TypeLink->TypeInfos[id]||($topid==$row[id]&&$type==top))&&$currentstyle!=)
我经测试这种调用方式currentstyle有效,可以解决在top=‘son’type=xx(指定ID)时候channel标签currentstyle样式无效不起作用的问题.
原文链接:http://www.jxszl.com/biancheng/dedecms/74834.html
热门阅读