在帝國(guó)CMS中可以采用“欄目 —> 自定義頁(yè)面 —> 增加自定義頁(yè)面”的形式生成網(wǎng)站地圖,文件名為sitemap.xml
sitemap.xml:其中l(wèi)oc代表鏈接地址和priority代表權(quán)重為,changefreq修改頻率和lastmod最好更改日期。
<?=’<?xml version=”1.0″ encoding=”UTF-8″?>’?>
<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
<url>
<loc>[!--news.url--]</loc>
<priority>1.000</priority>
</url>
[e:loop={"select * from [!db.pre!]enewsclass order by myorder”,0,24,0}]
<?
if($bqr['classurl']==”)
{
$sccurl=$public_r['newsurl'].$bqr['classpath'].”/”;
}
else
{
$sccurl=$bqr['classurl'].”/”;
}
?>
<url>
<loc><?=$sccurl?></loc>
<priority>0.6000</priority>
</url>
[/e:loop]
[e:loop={"select * from [!db.pre!]enewszt order by ztid”,0,24,0}]
<?
if($bqr['zturl']==”)
{
$sccurl=$public_r['newsurl'].$bqr['ztpath'].”/”;
}
else
{
$sccurl=$bqr['zturl'].”/”;
}
?>
<url>
<loc><?=$sccurl?></loc>
<priority>0.6000</priority>
</url>
[/e:loop]
[e:loop={"select * from [!db.pre!]ecms_news order by newstime”,0,24,0}]
<url>
<loc><?=$bqsr[titleurl]?></loc>
<priority>0.5000</priority>
</url>
[/e:loop]
</urlset>
更多信息請(qǐng)查看IT技術(shù)專欄