帝国cms sitemap制作教程可做插件

 sitemap的重要性,大家有目共睹,最近一些小伙伴跪求帝国CMS制作sitemap的方法教程,现在春哥亲自试验,将教程分享如下:

其实原理就是利用帝国CMS自定义页面功能。分享代码如下,又不懂的小伙伴,欢迎留言。

 

<?='<?xml version="1.0" encoding="GBK"?>'?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>

<loc>[!--news.url--]</loc>

<priority>1.0</priority>

<lastmod>[e:loop={'58,59,60,61,62,63,64,65,66',1,0,0,'','newstime DESC'}]<?=date('Y-m-d',$bqr[newstime])?>[/e:loop]</lastmod>

<changefreq>daily</changefreq>

</url>

[e:loop={'58,59,60,61,62,63,64,65,66',500,0,0,'','newstime DESC'}]

<url>

<priority>0.7</priority>

<loc><?=$bqsr[titleurl]?></loc>

<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>

<changefreq>daily</changefreq>

</url>

[/e:loop]

[e:loop={'58,59,60,61,62,63,64,65,66',500,0,0,'','newstime DESC'}]

<url>

<priority>0.7</priority>

<loc><?=$bqsr[titleurl]?></loc>

<lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>

<changefreq>daily</changefreq>

</url>

[/e:loop]

[e:loop={"select * from [!db.pre!]enewsclass order by myorder",0,24,0}]

<?

if($bqr['classurl']=='')

{

$sccurl=$public_r['newsurl'].$bqr['classpath']."/";

$addtime=date('Y-m-d',$bqr[addtime]);

}

else

{

$sccurl=$bqr['classurl']."/";

$addtime=date('Y-m-d',$bqr[addtime]);

}

?>

<url>

<loc><?=$sccurl?></loc>

<priority>0.8</priority>

<lastmod><?=$addtime?></lastmod>

<changefreq>daily</changefreq>

</url>

[/e:loop]

</urlset>



来源:春哥技术博客,欢迎分享,转载请注明出处。(欢迎加春哥团队客服微信号:taike668)

本文地址:https://www.cgtblog.com/diguo/129.html
上一篇:帝国CMS如何设置分页:15篇文章为一个分      下一篇:帝国cms 上一篇文章下一篇文章功能实