Heim  >  Artikel  >  CMS-Tutorial  >  So erstellen Sie eine Website-Sitemap mit Imperial CMS

So erstellen Sie eine Website-Sitemap mit Imperial CMS

藏色散人
藏色散人Original
2019-11-18 10:38:142507Durchsuche

So erstellen Sie eine Website-Sitemap mit Imperial CMS

Wie erstellt Empire CMS eine Website-Sitemap?

Fügen Sie eine benutzerdefinierte Seite, einen Dateinamen und ein Speicherverzeichnis hinzu: ../../sitemap/sitemap.xml

Der Code lautet wie folgt:

<?=&#39;<?xml version="1.0" encoding="UTF-8"?>&#39;?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.xx.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.xx.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.xx.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.xx.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.xx.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.xx.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.xx.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>

Schleifenspaltenliste Die Etikettenvorlage:

Der Code lautet wie folgt:

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

Das obige ist der detaillierte Inhalt vonSo erstellen Sie eine Website-Sitemap mit Imperial CMS. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn