In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
本篇内容介绍了"DEDECMS网站优化的细节有哪些"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
第一、栏目url标准化
当我用dede建了分类了时候,发现在栏目是带index.html的。
修改前:/abc/index.html
修改后:/abc/
打开文件:include/channelunit.func.php
大概在171行
$reurl = $typedir.'/'.$defaultname;
修改成: $reurl = $typedir.'/';
5.5版本不存在这个问题。
第二、栏目标题美化,去掉栏目斜杠。
修改前:顶级栏目 / 一级栏目
修改后:一级栏目 - 顶级栏目
打开文件:templets\default\list_*.htm
将{dede:field.title/} - {dede:global.cfg_webname/}
修改成:{dede:type}[field:typename /]{/dede:type} - {dede:field.title runphp='yes'} $ta = '1';$tb = '/';$tc = @me; $td = split($tb,$tc); @me = $td[$ta-1];{/dede:field.title} - {dede:global.cfg_webname/} ,此方法只适用于二层栏目,希望高手提供更好的方法。
第三、文章分页标题添加序号
修改前:标题、标题、标题
修改后:标题、标题(2)、标题(3)
打开文件:include/arc.archives.class.php
大概在347行修改成以下代码:
//循环生成HTML文件
else
{
for($i=1;$iTotalPage;$i++)
{
$tempTitle=$this->Fields['title'];//临时存储一个标题副本 2009.10.28
if($i>1)
{
$truefilename = $this->GetTruePath().$fileFirst."_".$i.".".$this->ShortName;
$this->Fields['title'] = $this->Fields['title'].'('.$i.')';//在标题后面多加个序号 2009.10.28
}
else
{
$truefilename = $this->GetTruePath().$filename;
}
$this->ParseDMFields($i,1);
$this->dtp->SaveTo($truefilename);
$this->Fields['title']=$tempTitle;//生成html,还原标题 2009.10.28
}
}
第四、自动关连文档标签引用:
关于{dede:field.title/},其他人还感兴趣的是:
dede:likearticle row='6' titlelen='42' orderby=rand}
[field:title/]
{/dede:likearticle}
"DEDECMS网站优化的细节有哪些"的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注网站,小编将为大家输出更多高质量的实用文章!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.