全国400电话网上服务平台
强大号码库资源任选,方便,快捷,快速开通。
咨询热线:400-1100-266
强大号码库资源任选,方便,快捷,快速开通。
咨询热线:400-1100-266
dedecms栏目内容自动标签的方法
POST TIME:2017-11-13 00:12
处理写法如下:
- {dede:field.contentrunphp="yes"}
- $str=preg_replace("/^\s+/","",html2text(@me));
- if(!empty($str)){
- @me='<divclass="content">'.@me.'</div>';
- }else{
- @me='';
- }
- {/dede:field.content}
由于栏目内容默认有标签或者空格吧,所以要先处理。