因为经常用织梦程序做网站,经常遇到sitemap制作的问题,网上很多插件都乱七八糟,生成的xml sitemap地图有各种各样的问题。用sitemap工具生成的也不好使。权重分配比较乱。所以我自己从网上找了一个修改了以下发出来。
如果想要用好插件,也需要做适当的更改更加适合自己的网站才行,但是网上基本都没有类似的内容。
织梦sitemap地图模块使用教程:
把sitemap.xsl上传到网站根目录下,这个文件主要是调用样式什么的,样子比较好看,不用也行。
模块文件在后台管理,插件那里上传,然后安装就行。
文件只有两个功能,一个是生成sitemap.xml文件,一个是sitemap.txt文件
网站sitemap定制:
访问 /zmmap/templets/admin 编辑sitemap.xml文件修改需要调用的链接。修改这个跟制作模板调用差不多,调用文章不用改。把自己要调用的栏目链接加进去就行了。
{dede:channel type='top'} <url> <loc>[field:typedir runphp='yes']if(strpos(@me,"{cmspath}") !== false){@me=str_replace('{cmspath}',$GLOBALS['cfg_basehost'],@me);}[/field:typedir]</loc> <priority>0.6</priority> <changefreq>daily</changefreq> </url> {/dede:channel}
这是调用所有顶级栏目
{dede:channel typeid='1,2,3'} <url> <loc>[field:typedir runphp='yes']if(strpos(@me,"{cmspath}") !== false){@me=str_replace('{cmspath}',$GLOBALS['cfg_basehost'],@me);}[/field:typedir]</loc> <priority>0.6</priority> <changefreq>daily</changefreq> </url> {/dede:channel}
这是调用栏目1,2,3栏目下的子栏目
具体就根据您自己的使用情况来了。
utf-8模块下载地址: 链接: https://pan.baidu.com/s/1xWzg-1mx0p_VNK7M5cxodQ 提取码: 2nsh
GB2312模块:链接: https://pan.baidu.com/s/1e9Go3aIofdjbd3sqkrKLug 提取码: 8aaj