首頁 > CMS教程 > 帝國CMS > 主體

帝國CMS怎麼製作網站sitemap

藏色散人
發布: 2019-11-18 10:38:14
原創
2547 人瀏覽過

帝國CMS怎麼製作網站sitemap

帝国CMS怎么制作网站sitemap?

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

代码如下:

<?=&#39;<?xml version="1.0" encoding="UTF-8"?>&#39;?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.xx.net[!--news.url--]</loc>
<lastmod><?=date("Y-m-d");?></lastmod>
<changefreq>daily</changefreq>
<priority>1.000</priority>
</url>
[e:loop={&#39;select classid,classname,classpath,wburl from [!db.pre!]enewsclass where bclassid=0 and showclass=0 and (classid<>52 and classid<>24) order by myorder&#39;,0,24,0}]
<?php
if(emptyempty($bqr[wburl]))
{
$sccurl= $public_r[newsurl].$bqr[classpath];
} else {
$sccurl= $bqr[wburl];
}
?>
<url>
<loc>https://www.xx.net<?=$sccurl?>/</loc>
<priority>0.6000</priority>
</url>
[/e:loop]
[listshowclass]&#39;0&#39;,25,1,0[/listshowclass] 模板在后面
[e:loop={"select * from [!db.pre!]ecms_news order by newstime DESC",0,24,0}]
<url>
<loc>https://www.xx.net<?=$bqsr[titleurl]?></loc>
<lastmod><?=date(&#39;Y-m-d&#39;,$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.xx.net<?=$bqsr[titleurl]?></loc>
<lastmod><?=date(&#39;Y-m-d&#39;,$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.xx.net<?=$bqsr[titleurl]?></loc>
<lastmod><?=date(&#39;Y-m-d&#39;,$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.xx.net<?=$bqsr[titleurl]?></loc>
<lastmod><?=date(&#39;Y-m-d&#39;,$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.xx.net<?=$bqsr[titleurl]?></loc>
<lastmod><?=date(&#39;Y-m-d&#39;,$bqr[newstime])?></lastmod>
<changefreq>daily</changefreq>
<priority>0.8000</priority>
</url>
[/e:loop]
</urlset>
登入後複製

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

代码如下:

[listshowclass]&#39;0&#39;,25,1,0[/listshowclass]
[!--empirenews.listtemp--]
<!--list.var1-->
[!--empirenews.listtemp--]
<url>
<loc>https://www.xx.net[!--classurl--]</loc>
<priority>0.6000</priority>
</url>
登入後複製

以上是帝國CMS怎麼製作網站sitemap的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!