Salad UN

To Taste The Salad Of Life.

« 翰威特视野-2009-06-华南区虚拟主机绑定多个域名或二级域名的方法 »

修改DedeCMS position实现“文章标题-2级栏目-1级栏目-网站名”

[ At 2009-5-18 By Ash   0 comments ]

实现DEDECMS“文章标题-2级栏目-1级栏目-网站名”形式

position方式实现:
代码如下:
{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'/}

将以上代码放在<title></title>之间就可以实现“文章标题-2级栏目-1级栏目-网站名”的形式了

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

最新评论及回复

最近发表

Powered By Z-Blog 1.8 Spirit Build 80722 Code detection by Codefense

Copyright 2008 www.s-un.cn. Some Rights Reserved.