修改:文章标题-2级栏目-1级栏目-网站名
{dede:field name='title'/}-{dede:field name='position' runphp='yes'}
$tc="-"; //分隔符
$tw=$GLOBALS['cfg_list_symbol']; //调用位置分隔符
@me=html2text(@me); //去除html标签
$tf=split($tw,@me); //分解成数组
for($ta=(count($tf)-2);$ta>=1;$ta--){ //循环赋值给$tk
$tk.=trim($tf[$ta]).$tc;
}
$tk=substr($tk,0,-1);
@me=$tk; //赋值给@me
{/dede:field}-{dede:global name='cfg_webname'/}
效果:文章标题-2级栏目-1级栏目-网站名
不过,应该可以更深的显示,比如:文章标题-3级栏目-2级栏目-1级栏目-网站名、文章标题-4级栏目3级栏目-2级栏目-1级栏目-网站名
{dede:field.title/}-{dede:type}[field:typename /]{/dede:type}-{dede:global.cfg_webname/}
文章名-直接所属栏目名-网站名
【织梦DedeCMS各种自定义当前位置顺序的方法】相关文章:
★ 织梦DEDECMS网站建设栏目自动添加nofollow的方法介绍
★ 织梦系统DedeCMS设定栏目及文档权限登录后跳转到登陆前的页面的实现方法
★ 织梦dedecms5.7版自动给图片添加alt属性的方法