本文實例講述了帝國cms網站sitemap制作方法。分享給大家供大家參考。具體實現方法如下:
增加自定義頁面,文件名及存放目錄:../../sitemap/sitemap.xml
代碼如下:
='<?xml version="1.0" encoding="UTF-8"?>'?> <urlset><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={'select?classid,classname,classpath,wburl?from?[!db.pre!]enewsclass?where?bclassid=0?and?showclass=0?and? (classid52?and?classid24)?order?by?myorder',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_news?order?by?newstime?DESC",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_shop?order?by?newstime?DESC",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_movie?order?by?newstime?DESC",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_baojia?order?by?newstime?DESC",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_download?order?by?newstime?DESC",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建站有所幫助。
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END