帝国CMS网站sitemap制作方法 - 广告联盟评测网
  1. 广告联盟评测网 > 流量运营 >

帝国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.jb51.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.jb51.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.jb51.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.jb51.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.jb51.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.jb51.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.jb51.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>登录后复制

这篇流量运营《帝国CMS网站sitemap制作方法》,目前已阅读次,本文来源于php中文,在2024-07-30发布,该文旨在普及流量运营知识,如果你有任何疑问,请通过网站底部联系方式与我们取得联系

  • 上一篇:帝国CMS实现高效随机调用的方法
  • 下一篇:帝国cms常用标签总结