1、二级栏目名设置方法
后台添加新栏目或者添加单网页(本文以单网页为例),设置为不在导航显示,模板手动设置为page_sitemap.html。
{pc:content action="category" catid="0" num="10" siteid="$siteid" order="listorder ASC"} <h2><a href="{siteurl($siteid)}">首页</a> {loop $data $r} <h2><a href="{$r[url]}">{$r[catname]}</a></h2> {if $top_parentid} {pc:content action="category" catid="$r[catid]" num="15" siteid="$siteid" order="listorder ASC"} {loop $data $v} <p><a href="{$v[url]}">{$v[catname]}</a></p> {/loop} {/pc} {/if} {/loop} {/pc}
然后,后台生成就可以了。
2、三级栏目名设置方法
如果有三级栏目,代码如下:
{pc:content action="category" catid="0" num="250" siteid="$siteid" order="listorder ASC"} <h2><a href="{siteurl($siteid)}">网站首页</a> {loop $data $r} <h2><a href="{$r[url]}">{$r[catname]}</a></h2> {if $top_parentid} {pc:content action="category" catid="$r[catid]" num="150" siteid="$siteid" order="listorder ASC"} {loop $data $t} <dl class="left"> <dt><a href="{$t[url]}">{$t[catname]}</a></dt> {if $t[child]} {pc:content action="category" catid="$t[catid]" num="150" siteid="$siteid" order="listorder ASC"} {loop $data $v} <dd><a href="{$v[url]}">{$v[catname]}</a></dd> {/loop} {/pc} {/if} </dl> {/loop} {/pc} {/if} {/loop} {/pc}
同理,后台生成一下就可以了。
以上就是关于PHPCMS制作网站地图sitemap.html完美教程的所有内容,为了网站更好的被收录,赶快设置下吧。
声明:【注明为本站原创的文章,转载请注明出处与原文地址!本站部分转载文章能找到原作者的我们都会注明,若文章涉及版权请发至邮箱:59818485@qq.com,我们以便及时处理。向本站投稿或需要本站向贵司网站定期免费投稿请加QQ:59818485,微信:15045371827】
帝玖网络 Copyright © 2018-2030.All Rights Reserved。 黑ICP备18004995号-3 技术顾问:高佰军