dede网站地图sitemap.xml

发布时间:2019-05-07作者:小灵龙点击:69

问题描述:
    制作一个dede网站地图,使用xml格式。
解决办法:
  1,操作代码。


<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
      <url>
          <loc>{dede:global.cfg_basehost/}</loc>
  
<lastmod>{dede:arclist row=1 titlelen=24 orderby=pubdate} [field:pubdate function=strftime('%Y-%m-%d',@me)/] {/dede:arclist}</lastmod>            <changefreq>always</changefreq>
<priority>1.0</priority>
</url>
{dede:channel row='1000' type='top'} <url>
<loc>[field:typelink /]</loc>
<changefreq>daily</changefreq> <priority>0.9</priority>
</url>
{/dede:channel} {dede:arclist row=2000 orderby=pubdate}
<url> <loc>[field:arcurl/]</loc>
<lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod> <changefreq>monthly</changefreq> <priority>0.8</priority>
</url>
{/dede:arclist}
</urlset>

 

将上面这个文件保存成一个模板文件如sitemap.htm,放在模板目录templets/plus下。
2,操作后台,打开自由列表管理,核心--频道模型
 
新建列表或者在列表中修改。


然后更新就可以了。


 

标签:dedexml,网站地图