摘要:制作dedecms模板文件代码,分别调用更新时间,500个栏目,5000条最新内容,条数可以对应自己修改数字。...
<?xml version="1.0" encoding="UTF-8" ?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://www.moban5.cn/</loc> <lastmod>{dede:arclist row=1 titlelen=24 orderby=pubdate}[field:pubdate function=strftime('%Y-%m-%d',@me)/]{/dede:arclist}</lastmod> <changefreq>daily</changefreq> <priority>1.0</priority> </url> {dede:channel row='500' type='top'} <url> <loc>https://www.moban5.cn{dede:field name='typeurl'/}</loc> <changefreq>daily</changefreq> <priority>0.8</priority> </url> {/dede:channel} {dede:arclist row=5000 orderby=pubdate} <url> <loc>https://www.moban5.cn[field:arcurl/]</loc> <lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod> <changefreq>monthly</changefreq> <priority>0.5</priority> </url> {/dede:arclist} </urlset>可以用自定义页面做,很简单复制代码创建一个模板有放入模板目录,选择这个目录生成xml即可。