本方法利用欄目分別創(chuàng)建不同的sitemap,達到SITEMAP分頁的效果,制作出來的SITEMAP完全符合https://www.google.com/webmasters/tools/docs/zh_CN/protocol.html的要求. 一、系統(tǒng)設置 -> 模板是否支持程序代碼: 是 (一定要先做好這一步,才進行下一步的工作,否則提交后出錯。)
二、打開后臺模板管理 -> 管理標簽模板 -> 增加標簽模板:
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
六、有問題聯(lián)系QQ:360920221 http://www.xhhnet.com |
|
|
|