Home > CMS Tutorial > Empire CMS > body text

Imperial CMS website sitemap creation method

silencement
Release: 2019-11-26 14:36:36
forward
3071 people have browsed it

Imperial CMS website sitemap creation method

This article describes how to create a sitemap for the Imperial CMS website with examples. Share it with everyone for your reference. The specific implementation method is as follows:

Add a custom page, file name and storage directory: ../../sitemap/sitemap.xml

The code is as follows:

<?=&#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>
Copy after login

Recommended to study "Empirecms Tutorial"

Label template for loop column list:

The code is as follows:

[listshowclass]&#39;0&#39;,25,1,0[/listshowclass]
[!--empirenews.listtemp--]
<!--list.var1-->
[!--empirenews.listtemp--]
<url>
<loc>https://www.jb51.net[!--classurl--]</loc>
<priority>0.6000</priority>
</url>
Copy after login

I hope this article will be helpful to everyone The Empire CMS website builder helps.

The above is the detailed content of Imperial CMS website sitemap creation method. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:www.word666.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template