[原创]ECMS4.6最新制作googlesitemap的方法
						 
						
							
								
									    本方法利用栏目分别创建不同的sitemap,达到SITEMAP分页的效果,制作出来的SITEMAP完全符合https://www.google.com/webmasters/tools/docs/zh_CN/protocol.html的要求. 一、系统设置 -> 模板是否支持程序代码:  是  (一定要先做好这一步,才进行下一步的工作,否则提交后出错。)
  二、打开后台模板管理 -> 管理标签模板 -> 增加标签模板:
  1、自定义google地图标签
  页面模板内容: [!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--]
  列表内容模板: <url>     <loc>http://www.yoursite.com[!--titleurl--]</loc>     <lastmod>[!--newstime--]</lastmod>    </url> 
  2、自定义google地图索引标签
  页面模板内容: [!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--]
  列表内容模板: [!--newstime--]
 
 
  三、管理自定义页面 -> 增加自定义列表:
  1、 页面名称:网站地图索引页
  文件名:   ../../sitemap_index.xml
  页面内容: <?='<?xml version="1.0" encoding="UTF-8"?>'?>    <sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">    <sitemap>       <loc>http://www.yoursite.com/sitemap1.xml</loc>       <lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>    </sitemap>    <sitemap>       <loc>http://www.yoursite.com/sitemap2.xml</loc>       <lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>    </sitemap> <sitemap>       <loc>http://www.yoursite.com/sitemap3.xml</loc>       <lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>    </sitemap> <sitemap>       <loc>http://www.yoursite.com/sitemap4.xml</loc>       <lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>    </sitemap> <sitemap>       <loc>http://www.yoursite.com/sitemap5.xml</loc>       <lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>    </sitemap> <sitemap>       <loc>http://www.yoursite.com/sitemap6.xml</loc>       <lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>    </sitemap>    </sitemapindex>
 
  2、 页面名称:网站地图1
  文件名:   ../../sitemap1.xml
  页面内容: <?='<?xml version="1.0" encoding="UTF-8"?>'?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">   <url>   <loc>http://www.yoursite.com</loc> </url>   [ecmsinfo]栏目ID,50000,0,0,0,地图标签ID,0[/ecmsinfo]  </urlset>
 
  3、 页面名称:网站地图2
  文件名:   ../../sitemap2.xml
  页面内容: <?='<?xml version="1.0" encoding="UTF-8"?>'?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">   <url>   <loc>http://www.yoursite.com</loc> </url>   [ecmsinfo]栏目ID,50000,0,0,0,地图标签ID,0[/ecmsinfo]  </urlset>
 
  4、 页面名称:网站地图3
  文件名:   ../../sitemap3.xml
  页面内容: <?='<?xml version="1.0" encoding="UTF-8"?>'?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">   <url>   <loc>http://www.yoursite.com</loc> </url>   [ecmsinfo]栏目ID,50000,0,0,0,地图标签ID,0[/ecmsinfo]  </urlset>
 
  5、 页面名称:网站地图4
  文件名:   ../../sitemap4.xml
  页面内容: <?='<?xml version="1.0" encoding="UTF-8"?>'?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">   <url>   <loc>http://www.yoursite.com</loc> </url>   [ecmsinfo]栏目ID,50000,0,0,0,地图标签ID,0[/ecmsinfo]  </urlset>
 
  6、 页面名称:网站地图5
  文件名:   ../../sitemap5.xml
  页面内容: <?='<?xml version="1.0" encoding="UTF-8"?>'?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">   <url>   <loc>http://www.yoursite.com</loc> </url>   [ecmsinfo]栏目ID,50000,0,0,0,地图标签ID,0[/ecmsinfo]  </urlset>
 
  7、 页面名称:网站地图6
  文件名:   ../../sitemap6.xml
  页面内容: <?='<?xml version="1.0" encoding="UTF-8"?>'?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">   <url>   <loc>http://www.yoursite.com</loc> </url>   [ecmsinfo]栏目ID,50000,0,0,0,地图标签ID,0[/ecmsinfo]  </urlset>
  四、后台 -> 数据更新 刷新所有自定义页面
  五、提交sitemap_index.xml
  六、有问题联系QQ:360920221    http://www.xhhnet.com
								 | 
							 
						 
						 
						
						
 
  
					 | 
				 
			 
		 |