<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

Dedecms通过{dede:sql}标签调用Discuz帖子,如何限制标题字数?

时间:2020-12-21

小编在首页以及内容页都有调用到discuz的帖子,但是Dedecms 5.7调用DiscuzX2.5的帖子是通过{dede:sql}标签实现的,所以不能够想dede自带的那些标签一样,直接使用titlelen来控制标题的字数,那么如何才能控制帖子的标题字数呢?
    很简单,只要在你所调用的数据表的字段后面加上“function="cn_substr(@me,18)"”即可,里面的18即字数限制(9个中文字符)。
    例如Discuz的帖子标题存放在数据表里pre_forum_thread,标题的字段为subject,那么标题的调用标签则为[field:subject /],需要限制字数则为[field:subject function="cn_substr(@me,18)"/]。
    很简单吧?大家不妨一试
0
首页
案例
关于
联系