其实织梦想要生成sitemap.xml也不难,只要我们自己做一个sitemap.xml生成模板,然后将模板添加到后台,每次更新完资料之后,生成一下sitemap.xml也就可以了。不说那么多了,上图,上代码:

织梦生成sitemap.xml

织梦生成sitemap.xml
1 2 3 4 5 6 7 8 9 10 11 | <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> {dede:arclist typeid='top' row='100000' orderby='id'}<url> <loc>[field:global.cfg_basehost/][field:arcurl/]</loc> <lastmod>[field:pubdate function="GetDateMK(@me)"/]</lastmod> <changefreq>always</changefreq> <priority>1.0</priority> </url> {/dede:arclist} </urlset> |
添加好后,就相当于增加了一个隐形栏目,更新全站栏目的时候就自动更新sitemap.xml了,或者在更新栏目HTML的地方选择sitemap栏目进行更新,非常方便。