百度
360搜索
搜狗搜索

帝国CMS网站sitemap制作方法详细介绍

这篇文章主要为大家介绍了帝国CMS网站sitemap制作方法,涉及采用灵动标签调用数据库信息及生成XML文件的方法,是进行网站SEO非常实用的技巧,需要的朋友可以参考下

本文实例讲述了帝国sitemap制作方法。分享给大家供大家参考。具体实现方法如下:

增加自定义页面,文件名及存放目录:../../sitemap/sitemap.

代码如下: <?='<?xml version="1.0" encoding="UTF-8"?>'?>

<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={'select
classid,classname,classpath,wburl from [!db.pre!]enewsclass where bclassid=0 and showclass=0 and (classid<>52 and classid<>24) order by myorder',0,24,0}]

<?

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!]_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[t
http://itleurl]?></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>

循环栏目列表的标签模板:

代码如下: [listshowclass]'0',25,1,0[/listshowclass]

[!--empirenews.listtemp--]

<!--list.var1-->

[!--empirenews.listtemp--]

<url>

<loc>https://www.jb51.net[!--classurl--]</loc>

<priority&g
t;0.6000</priority>

</url>

希望本文所述对大家的建站有所帮助。

本文标题: 帝国CMS网站sitemap制作方法 ,

网站数据信息

"帝国CMS网站sitemap制作方法"浏览人数已经达到44次,如你需要查询该站的相关权重信息,可以点击进入"Chinaz数据" 查询。更多网站价值评估因素如:帝国CMS网站sitemap制作方法的访问速度、搜索引擎收录以及索引量、用户体验等。 要评估一个站的价值,最主要还是需要根据您自身的需求,如网站IP、PV、跳出率等!