sheep 发表于 2022-12-29 18:08:47

帝国sitemap生成代码_无需插件(首页栏目文章tag标签)


帝国cms生成sitemap源码,无需安装插件。帝国CMS怎么制作网站sitemap?帝国如何自动生成sitemap?以下代码可生成首页、栏目页、文章页及tag标签页链接,包含链接、时间、更新频率、权重分配

首页打开帝国后台,栏目—自定义页面-增加自定义页面,选择:直接页面式 设置页面名称为sitemap.xml ,修改文件名为:../../sitemap.xml (根目录)
(完成后注意每次更新需要刷新自定义页面)
注意:
1、如果文章链接不是绝对路径,需确保
    ①系统参数网站地址填写域名
    ②系统-数据更新-更新信息页地址后更新自定义页面即可
2、如果你的tag链接形式不是默认的动态链接:e/tags/?tagname=关键词,以下sitemap生成代码tag部分则需要修改tag链接调用方式
tag标签调用参考以下文档,进入页面后f12搜索tag:
《帝国cms常用调用标签方法大全(灵动_万能)》http://bbs.shaomingyang.com/thread-432-1-1.html
帝国sitemap完整生成代码如下:
<?='<?xml version="1.0" encoding="UTF-8"?>'?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>[!--news.url--]</loc>
<lastmod><?php echo date("Y-m-d H:i:s") ; ?></lastmod>
<changefreq>Always</changefreq>
<priority>1.00</priority>
</url>
enewsclass order by myorder",0,24,0}]
<?
if($bqr['classurl']=='')
{
$sccurl=$public_r['newsurl'].$bqr['classpath']."/";
}
else
{
$sccurl=$bqr['classurl']."/";
}
?>
<url>
<loc><?=$sccurl?></loc>
<lastmod><?php echo date("Y-m-d H:i:s") ; ?></lastmod>
<changefreq>Always</changefreq>
<priority>0.80</priority>
</url>


enewstags order by num DESC limit 20",0,24,0}]
<url>
<loc><?=$public_r?>e/tags/?tagname=<?=$bqr['tagname']?></loc>
<lastmod><?php echo date("Y-m-d H:i:s") ; ?></lastmod>
<changefreq>Always</changefreq>
<priority>0.60</priority>
</url>


enewszt order by ztid",0,24,0}]
<?
if($bqr['zturl']=='')
{
$sccurl=$public_r['newsurl'].$bqr['ztpath']."/";
}
else
{
$sccurl=$bqr['zturl']."/";
}
?>
<url>
<loc><?=$sccurl?></loc>
<lastmod><?php echo date("Y-m-d H:i:s") ; ?></lastmod>
<changefreq>daily</changefreq>
<priority>0.6000</priority>
</url>

ecms_news order by newstime desc",0,24,0}]
<url>
<loc><?=$bqsr?></loc>
<lastmod><?php echo date("Y-m-d H:i:s") ; ?></lastmod>
<changefreq>daily</changefreq>
<priority>0.60</priority>
</url>

</urlset>






页: [1]
查看完整版本: 帝国sitemap生成代码_无需插件(首页栏目文章tag标签)