首页 > 建站‧营销

PbootCMS常用标签之一


三级栏目导航调用:

{pboot:nav parent=2}
<dd>
<dl>
<dt id="service21"><a href="javascript:;">[nav:name]</a></dt>
<dd>
<ul>
{pboot:2nav parent=[nav:scode]}
<li><a href="[2nav:link]">[2nav:name]</a></li>
{/pboot:2nav}
</ul>
</dd>
</dl>
</dd>
{/pboot:nav}

顶部导航高亮代码:

<li {pboot:if(0=='{sort:scode}')}class="on"{/pboot:if}><a href="/">首页</a></li>
{pboot:nav num=4 parent=0}
<li {pboot:if('[nav:scode]'=='{sort:tcode}')}class="on"{/pboot:if}><a href="[nav:link]">[nav:name]</a></li>
{/pboot:nav}

指定栏目产品调用例子: <ul> {pboot:list scode=5 num=6 order=date} <li> <a href="[list:link]" target="_blank"> <img src="[list:ico]" alt="[list:title]"/> <p>[list:title len=18]</p></a> [list:date style=Y-m-d] [list:description] </li> {/pboot:list} </ul>

关于我们等栏目内容调用例子:

{pboot:content id=86}[content:content drophtml=1 dropblank=1 len=154]{/pboot:content}


页面浏览数:{content:visits}

日期调用代码:


[list:date style=d]或[list:date style=m]或[list:date style=y-m-d]

图集调用

{pboot:picsid={content:id}num=1}<imgsrc="{content:ico}"alt="[pics:title]"/>{/pboot:pics}


指定栏目名称及链接例子

<a href="{pboot:sort scode=8}[sort:link]{/pboot:sort}">{pboot:sort scode=8}[sort:name]{/pboot:sort}</a>

手机独立版js代码

<script type="text/javascript">
if(!navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)&&window.location.host.indexOf('m.xx.com')>=0&&window.location.href.indexOf('fromwebmanage')<0){
window.location = window.location.href.replace("m.xx.com", "www.xx.com");
}
</script>


轮播图调用

{pboot:slide num=5 gid=1}
<div class="swiper-slide"><a href=""><img alt="{pboot:sitetitle}" src="[slide:src]"></a></div>
{/pboot:slide}



{pboot:slide num=5 gid=1}
<div class="swiper-slide"><a href="/" target="_blank"><img src="[slide:src]" alt="banner" class="img-responsive" /></a>
<div class="txt txt1">
<p>[slide:title]</p>
<p>[slide:subtitle]</p>
</div>
</div>
{/pboot:slide}


{pboot:slide gid=1 num=5}
<div class="item {pboot:if('[slide:n]'==0)}{else}active{/pboot:if}">
<img src="[slide:src]" alt="[slide:title]"> </div>
{/pboot:slide}

搜索框调用

<form name="formsearch" action="/search/" method="get">
<input type="hidden" name="kwtype" value="0" />
<span class="navsearch_input">
<input type="text" name="keyword" size="20" placeholder="请输入搜索关键词"> </span>
<button type="submit" class="searchgo"><i class="fa fa-search" aria-hidden="true"></i></button>
</form>

友情链接调用:

{pboot:link num=3 gid=1}
<a href="[link:link]" target="_blank">[link:name]</a>
{/pboot:link}


分页调用:

<a href='{page:pre}'>&laquo;</a>{page:numbar}<a href='{page:next}'>&raquo;</a>


自定义字段调用例子:

[list:ext_tjzhi]


自定义标签例子:

{label:downlink}


标题样式:

首页:{pboot:sitetitle}、专题页:{sort:title}-{pboot:sitesubtitle}、列表页:{sort:title}-{pboot:sitesubtitle}、内容页:{content:title}-{pboot:sitesubtitle}


指定属性调用:

{pboot:list scode=2 num=1 tags='XXX'}内容{/pboot:list}
{pboot:list scode=2 num=1 order=istop}内容{/pboot:list}
{pboot:list scode=2 num=1 order=isrecommend}内容{/pboot:list}


本文链接:https://zhanque.net/cms/4628.html