位置: IT常识 - 正文

帝国CMS网站sitemap制作方法(帝国cms8.0)

编辑:rootadmin
这篇文章主要为大家介绍了帝国CMS网站sitemap制作方法,涉及采用灵动标签调用数据库信息及生成XML文件的方法,是进行网站SEO非常实用的技巧,需要的朋友可以参考下

推荐整理分享帝国CMS网站sitemap制作方法(帝国cms8.0),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:帝国cms app,帝国cms视频教程,帝国cms视频教程,帝国cms8.0,帝国cms8.0,帝国CMS网站附件图片采用360云盘,帝国CMS网站附件图片采用360云盘,帝国CMS网站间文件推送插件,内容如对您有帮助,希望把文章链接给更多的朋友!

本文实例讲述了帝国CMS网站sitemap制作方法。分享给大家供大家参考。具体实现方法如下:

帝国CMS网站sitemap制作方法(帝国cms8.0)

增加自定义页面,文件名及存放目录:../../sitemap/sitemap.xml

代码如下:

<?='<?xml version="1.0" encoding="UTF-8"?>'?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://www.jb51.net[!--news.url--]</loc><lastmod><?=date("Y-m-d");?></lastmod><changefreq>daily</changefreq><priority>1.000</priority></url>[e:loop={'select classid,classname,classpath,wburl from [!db.pre!]enewsclass where bclassid=0 and showclass=0 and(classid<>52 and classid<>24) order by myorder',0,24,0}]<?phpif(emptyempty($bqr[wburl])){$sccurl= $public_r[newsurl].$bqr[classpath];} else {$sccurl= $bqr[wburl];}?><url><loc>https://www.jb51.net<?=$sccurl?>/</loc><priority>0.6000</priority></url>[/e:loop][listshowclass]'0',25,1,0[/listshowclass] 模板在后面[e:loop={"select * from [!db.pre!]ecms_news order by newstime DESC",0,24,0}]<url><loc>https://www.jb51.net<?=$bqsr[titleurl]?></loc><lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod><changefreq>daily</changefreq><priority>0.8000</priority></url>[/e:loop][e:loop={"select * from [!db.pre!]ecms_shop order by newstime DESC",0,24,0}]<url><loc>https://www.jb51.net<?=$bqsr[titleurl]?></loc><lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod><changefreq>daily</changefreq><priority>0.8000</priority></url>[/e:loop][e:loop={"select * from [!db.pre!]ecms_movie order by newstime DESC",0,24,0}]<url><loc>https://www.jb51.net<?=$bqsr[titleurl]?></loc><lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod><changefreq>daily</changefreq><priority>0.8000</priority></url>[/e:loop][e:loop={"select * from [!db.pre!]ecms_baojia order by newstime DESC",0,24,0}]<url><loc>https://www.jb51.net<?=$bqsr[titleurl]?></loc><lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod><changefreq>daily</changefreq><priority>0.8000</priority></url>[/e:loop][e:loop={"select * from [!db.pre!]ecms_download order by newstime DESC",0,24,0}]<url><loc>https://www.jb51.net<?=$bqsr[titleurl]?></loc><lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod><changefreq>daily</changefreq><priority>0.8000</priority></url>[/e:loop]</urlset>

推荐学习《帝国cms教程》

循环栏目列表的标签模板:

代码如下:

[listshowclass]'0',25,1,0[/listshowclass][!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--]<url><loc>https://www.jb51.net[!--classurl--]</loc><priority>0.6000</priority></url>

希望本文所述对大家的帝国CMS建站有所帮助。

本文链接地址:https://www.jiuchutong.com/zhishi/310710.html 转载请保留说明!

上一篇:OK源码首发2022年最新wordpress主题破解版本Zibll子比主题V6.4最新版完美破解-电脑学习网(开源 okr)

下一篇:c语言中static修饰局部静态变量(c语音中static)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络