对于xml地图,相比不用多说了,做SEO的都知道网站地图是搜索引擎索引网站的首要入口,尤其是xml地图,那么对于使用帝国cms建站的朋友如何为网站添加xml地图呢?
帝国cms]网站xml地图文件模板:
将以下代码中的网址请替换成自己网站的网址。请将代码复制到文本编辑器里然后再去制作地图,直接复制过去可能会带上网站的标签。
1、pc站xml地图模板代码如下:
?='?xml version=1.0 encoding=UTF-8?'?
urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9
url
lochttp://www.softhome.cc/html//loc
changefreqalways/changefreq
lastmod?=date(Y-m-d,time())?/lastmod
priority1.000/priority
/url
[e:loop={select * from [!db.pre!]enewsclass order by myorder,0,24,0}]
?
if($bqr['classurl']=='')
{$sccurl=$public_r['newsurl'].$bqr['classpath']./;}
else
{$sccurl=$bqr['classurl']./;}
?
url
lochttp://www.softhome.cc?=$sccurl?/loc
changefreqdaily/changefreq
lastmod?=date(Y-m-d)?/lastmod
priority0.8000/priority
/url
[/e:loop]
[e:loop={select * from [!db.pre!]enewszt order by ztid,0,24,0}]
?
if($bqr['zturl']=='')
{$sccurl=$public_r['newsurl'].$bqr['ztpath']./;}
else
{$sccurl=$bqr['zturl']./;}
?
url
lochttp://www.softhome.cc?=$sccurl?/loc
lastmod?=date('Y-m-d',$bqr[newstime])?/lastmod
changefreqdaily/changefreq
priority0.8000/priority
/url
[/e:loop]
[e:loop={select * from [!db.pre!]ecms_news order by newstime desc,5000,24,0}]
url
lochttp://www.softhome.cc?=$bqsr[titleurl]?/loc
lastmod?=date('Y-m-d',$bqr[newstime])?/lastmod
changefreqdaily/changefreq
priority0.7000/priority
/url
[/e:loop]
/urlset
2、手机移动站xml网站地图模板
?='?xml version=1.0 encoding=UTF-8?'?
urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9 xmlns:mobile=http://www.baidu.com/schemas/sitemap-mobile/1/
url
lochttp://m.wugongqi.cn//loc
mobile:mobile type=mobile/
changefreqalways/changefreq
lastmod?=date(Y-m-d,time())?/lastmod
priority1.000/priority
/url
[e:loop={select * from [!db.pre!]enewsclass order by myorder,0,24,0}]
?
if($bqr['classurl']=='')
{$sccurl=$public_r['newsurl'].$bqr['classpath']./;}
else
{$sccurl=$bqr['classurl']./;}
?
url
lochttp://m.wugongqi.cn?=$sccurl?/loc
mobile:mobile type=mobile/
changefreqdaily/changefreq
lastmod?=date(Y-m-d)?/lastmod
priority0.8000/priority
/url
[/e:loop]
[e:loop={select * from [!db.pre!]enewszt order by ztid,0,24,0}]
?
if($bqr['zturl']=='')
{$sccurl=$public_r['newsurl'].$bqr['ztpath']./;}
else
{$sccurl=$bqr['zturl']./;}
?
url
lochttp://m.wugongqi.cn?=$sccurl?/loc
mobile:mobile type=mobile/
lastmod?=date('Y-m-d',$bqr[newstime])?/lastmod
changefreqdaily/changefreq
priority0.8000/priority
/url
[/e:loop]
[e:loop={select * from [!db.pre!]ecms_news order by newstime desc,5000,24,0}]
url
lochttp://m.wugongqi.cn?=$bqsr[titleurl]?/loc
mobile:mobile type=mobile/
lastmod?=date('Y-m-d',$bqr[newstime])?/lastmod
changefreqdaily/changefreq
priority0.7000/priority
/url
[/e:loop]
/urlset
帝国cms制作xml网站地图:
做地图文件我们需要用到帝国cms7.0的自定义页面功能,下面是具体步骤。
1、首先登陆后台,点击顶部导航的【栏目】,然后点击左侧导航的【自定义页面】,展开二级菜单,点击【增加自定义页面】,如下图操作:
2、来到增加自定义页面编辑界面(如下图),我们选择【直接页面式】,在标题处我们可根据站点类型添加名称,比如【三次元世界网站地图】,文件名填写【../../sitemap.xml】,接下来将网站地图的模板文件复制到【页面内容】里,注意要把模板里的域名换成自己网站的;
最后保存测试效果如下: