dedecms 超连接显示目录路径,去掉index.html文件名

| |
时间: 不指定 2008/03/05 17:51 , 作者: 邢磊
seo网站优化,dedecms怎样让超连接显示目录路径,去掉index.html文件名

1.首页,栏目,文章页面顶部的导航栏修改

  
<!--导航栏-->
        <div class="topmenu cbody">
        <ul>
            <li><a href="/">首页</a> {dede:channel type='top' row='8'} </li>
            <li><a href="[field:typelink function='str_replace("index.html","",@me)'/]">[field:typename/]</a> {/dede:channel} </li>
            <li><a href='{dede:field name='specurl'}{/dede:field}/index.php'>专题</a></li>
            <li><a href="/plus/guestbook/index.php">留言</a> </li>
        </ul>


2.如果你希望文章的地址也是目录格式的,需要修改    文章命名规则:为类似如下格式
{typedir}/mtv_{Y}{M}{D}{aid}/index.html


然后你就可以在模板里的文章链接地址里面加入如下一段

function='str_replace("index.html","",@me)'


其余的看大家个人爱好修改dedecms目录路径后面的index.html了!
类别:ASP:PHP:C#.NET | Tags: , , | 0 条评论, 542 次阅读
网友评论(0):
发表评论
表情
emotemotemotemot
emotemotemotemot
emotemotemotemot
emotemotemotemot
emotemotemotemot
emotemotemotemot
emotemotemotemot
emotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]