欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
  本文实例讲述了帝国CMS网站sitemap制作方法。分享给大家供大家参考。具体实现方法如下:
 
  增加自定义页面,文件名及存放目录:../../sitemap/sitemap.xml
 
  代码如下:
 
  
 
  
 
  
 
  
 
  <?='<?xmlversion="1.0"encoding="UTF-8"?>'?>
 
  <urlsetxmlns="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={'selectclassid,classname,classpath,wburlfrom[!db.pre!]enewsclasswherebclassid=0andshowclass=0and
 
  (classid<>52andclassid<>24)orderbymyorder',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]'0',25,1,0[/listshowclass]模板在后面
 
  [e:loop={"select*from[!db.pre!]ecms_newsorderbynewstimeDESC",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_shoporderbynewstimeDESC",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_movieorderbynewstimeDESC",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_baojiaorderbynewstimeDESC",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_downloadorderbynewstimeDESC",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建站有所帮助。




本文转载自人民网
 

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c54334.shtml