织梦dedecms制作谷歌地图的方法
类别:建站知识   时间:02-05

织梦dedecms在默认程序中就自带了百度地图,所以在生成的时候就容易多了,但是在谷歌地图上就没有那么简单了,网站地图对优化也有很大的好处,所以在网站中最好两个地图都存在,这样才能让网站有一个更好的排名。
复制下面的这些代码保存为sitemap.htm模板文件然后上传到模板所在目录templets/{style}/sitemap.htm 这样的路径,其中{style}为模板文件夹
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.最模板zuimoban.com/schemas/sitemap/0.9">
<url>
<loc>http://你的域名</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='100' type='top'}
<url>
<loc>http://你的域名[field:typelink /]</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
{/dede:channel}
{dede:arclist row=10000 orderby=pubdate}
<url>
<loc>http://你的域名[field:arcurl/]</loc>
<lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod>
<changefreq>monthly</changefreq>
</url>
{/dede:arclist}
</urlset>

智慧半岛,是一家专注于青岛网站建设青岛网站开发的青岛网络公司,Copyright ©2007-2019 Ebandao.Cn 版权所有 All Rights Reserved.(建议在1366x768以上的浏览器中访问)鲁ICP备08014496号

13153297890