请问pbootcms常用标签代码集合
内容整理成表格的形式,便于查阅和使用:
| 功能 | 标签 | 参数 | 示例 | 说明 | 
|---|---|---|---|---|
| 模板文件嵌套引用 | {include file=***.html} | 无 | {include file=head.html} | 可以嵌套使用,如: index.html嵌套head.html,同时head.html中嵌套comm.html。支持使用子目录。 | 
| 时间格式化标签 | [list:date]<br>{content:date} | style=* | [list:date style=Y-m-d]<br>{content:date style=Y-m-d} | 时间格式化标签和 PHP 时间格式化语法一致。参考链接:PHP 时间格式化 | 
| HTML 去除标签 | [list:content]<br>{content:content} | drophtml=1 | [list:content drophtml=1]<br>{content:content drophtml=1} | 一般在首页等特殊位置需要调取正文一段纯文本时使用。 | 
| 内容截取标签 | [list:title]<br>{content:title} | len=*<br>lencn=*<br>more=* | [list:title len=10]<br>{content:title len=10}<br>[list:title more=*] | 长度截取使用 len=或lencn=,使用more=*设置省略号内容。 | 
| 其它格式化标签 | [list:content]<br>{content:content} | dropblank=1<br>decode=1<br>decimal=*<br>unit=*<br>operate=*<br>lfield=*<br>mark=1 | [list:content dropblank=1]<br>[list:content decode=1]<br>[list:content decimal=2]<br>[list:content unit=kb]<br>[list:content operate=+1000]<br>[list:content lfield=a,b]<br>[search:title mark=1] | 去除空白字符、解码数据、小数点位数、容量单位、数字运算、限制列表数据查询字段、标红搜索结果关键字。 | 
| 自定义标签 | {label:*} | 无 | {label:custom_label} | 在后台“全局配置 > 定制标签”中定义,前台使用对应名字进行调用。 | 
| 面包屑标签 | {pboot:position} | separator=*<br>separatoricon=*<br>indextext=*<br>indexicon=* | {pboot:position separator=>> separatoricon=’fa fa-angle-double-right’ indextext=首页 indexicon=’fa fa-home’} | 分隔符、分割图标、首页文本、首页图标。 | 
| 当前网址 | {pboot:httpurl} | 无 | {pboot:httpurl} | 自适应获取当前访问网址。 | 
| 当前页面 | {pboot:pageurl} | 无 | {pboot:pageurl} | 自适应获取当前访问页面完整地址。 | 
| 二维码生成标签 | {pboot:qrcode string=*} | string=* | {pboot:qrcode string={pboot:httpurl}{content:link}}<br>{pboot:qrcode string={pboot:pageurl}} | 生成对应文本的二维码图片。 | 
| 程序运行时间 | {pboot:runtime} | 无 | {pboot:runtime} | 输出页面运行时间/缓存时间。 | 
| 留言验证码 | {pboot:checkcodestatus} | 无 | {pboot:checkcodestatus} | 判断留言验证码是否开启状态。 | 
| 站点地图 | http://domain/index.php/sitemap<br>http://domain/index.php/sitemap.xml | 无 | 访问地址即为实时地图。 | |
| 图片缩放及裁剪 | [list:ico] | width=*<br>height=*<br>maxwidth=*<br>maxheight=* | [list:ico width=100]<br>[list:ico height=100]<br>[list:ico maxwidth=100]<br>[list:ico maxheight=100] | 四个参数可以组合使用,生成改变了图片大小的缓存图片。 | 
通过以上表格,你可以快速查阅和使用PBootCMS的各种标签和功能。

更新时间:2025-04-10 23:53:48
上一篇:请问PbootCMS授权码可以更换域名吗? 授权码丢失怎么办?
下一篇:请问PbootCMS修改网站标题显示方式,去掉副标题
转载请注明原文链接:https://www.muzicopy.com/suibi/3964.html
