当前位置: 首页 > cms教程

帝国CMS如何自动生成sitemap.xml网站地图

时间:2026-01-30 12:03:16

步骤:

1、登录网站的后台你的域名/e/admin/ 进入后台栏目 =》增加自定义页面 =》选择直接页面,页面名称为:网站地图,文件名修改为 ../../sitemap.xml

2、具体sitemap.xml模板代码,标准:

<?='<?xml version="1.0" encoding="UTF-8"?>'?>   <urlset xmlns="sitemaps/schemas/sitemap/0.9">    <url>        <loc>[!--news.url--]</loc>        <changefreq>daily</changefreq>        <priority>1.0</priority>    </url>    <url>        <loc>[!--news.url--]hmoban</loc>        <changefreq>daily</changefreq>        <priority>0.8</priority>    </url>    <url>        <loc>[!--news.url--]wpyuanma</loc>        <changefreq>daily</changefreq>        <priority>0.8</priority>    </url>    <url>        <loc>[!--news.url--]diguoCMS</loc>        <changefreq>daily</changefreq>        <priority>0.8</priority>    </url>    <url>        <loc>[!--news.url--]news</loc>        <changefreq>daily</changefreq>        <priority>0.8</priority>    </url>[e:loop={1,30000,3,1,'','newstime DESC'}]    <url>        <loc><?=$bqsr['titleurl']?></loc>        <lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>        <changefreq>monthly</changefreq>        <priority>0.7</priority>    </url>[/e:loop][e:loop={2,30000,3,1,'','newstime DESC'}]    <url>        <loc><?=$bqsr['titleurl']?></loc>        <lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>        <changefreq>monthly</changefreq>        <priority>0.7</priority>    </url>[/e:loop][e:loop={3,30000,3,1,'','newstime DESC'}]    <url>        <loc><?=$bqsr['titleurl']?></loc>        <lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>        <changefreq>monthly</changefreq>        <priority>0.7</priority>    </url>[/e:loop][e:loop={4,30000,3,1,'','newstime DESC'}]    <url>        <loc><?=$bqsr['titleurl']?></loc>        <lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>        <changefreq>monthly</changefreq>        <priority>0.7</priority>    </url>[/e:loop]</urlset>注意:[e:loop={栏目ID,30000,3,1,'','newstime DESC'}] 中栏目ID,可以修改成后台所有ID,不够就直接增加。

3、设置自动更新功能,手动刷新生成自页面。

4、全部完成后,请打开你的域名/sitemap.xml,查看后满意即可。


上一篇:帝国cms 子栏目调用显示方式
下一篇:帝国cms【点击数】[ !--onclick--]不更新的解决方法
帝国CMS网站地图 sitemap 网站地图
  • 英特尔与 Vertiv 合作开发液冷 AI 处理器
  • 英特尔第五代 Xeon CPU 来了:详细信息和行业反应
  • 由于云计算放缓引发扩张担忧,甲骨文股价暴跌
  • Web开发状况报告详细介绍可组合架构的优点
  • 如何使用 PowerShell 的 Get-Date Cmdlet 创建时间戳
  • 美光在数据中心需求增长后给出了强有力的预测
  • 2027服务器市场价值将接近1960亿美元
  • 生成式人工智能的下一步是什么?
  • 分享在外部存储上安装Ubuntu的5种方法技巧
  • 全球数据中心发展的关键考虑因素
  • 英特尔与 Vertiv 合作开发液冷 AI 处理器

    英特尔第五代 Xeon CPU 来了:详细信息和行业反应

    由于云计算放缓引发扩张担忧,甲骨文股价暴跌

    Web开发状况报告详细介绍可组合架构的优点

    如何使用 PowerShell 的 Get-Date Cmdlet 创建时间戳

    美光在数据中心需求增长后给出了强有力的预测

    2027服务器市场价值将接近1960亿美元

    生成式人工智能的下一步是什么?

    分享在外部存储上安装Ubuntu的5种方法技巧

    全球数据中心发展的关键考虑因素