muban大师 发表于 2020-3-10 11:50:09

织梦在channel标签的currentstyle中使用全局变量

织梦dedecms在channel标签的currentstyle中使用全局变量。
        在 include/taglib/channel.lib.php line 140
        $linkOkstr = str_replace("~typename~",$row['typename',,$linkOkstr);
       
        后面补上一句
       
        $linkOkstr = preg_replace_callback('/\~global\.(\w+)?\~/i', function($matches)
        { return $GLOBALS[$matches[1,,; }, $linkOkstr);
       
        即可如下使用:
       
        {dede:channel type='top' row='10' currentstyle="
        "}
        [*,/#nav,
       
        {/dede:channel}
页: [1]
查看完整版本: 织梦在channel标签的currentstyle中使用全局变量