dedecms 标题字数超过某长度被截取后鼠标移上后显示完整标题

2022-08-18

dedecms 标题过长被截取后则鼠标移上后显示完整标题title,反之则不显的笨方法。

例:

{dede:arclist row='10' flag='c'  orderby='pubdate' typeid='360' idlist=''}  //最好这儿能加上titlelen=‘100’,因为默认是titlelen='30'
   

  • title="[field:title function='(strlen("@me")<28 ? cn_substr("@me",1,100):"@me")'/]  //标题长度小于28个字符则从经一百个字符起截取1个字符为TITLE,因为一般标题都没这么长,可视化则不显示TITLE。反之则显示全部TITLE。

    [field:title function='(strlen("@me")>28 ? cn_substr("@me",28)."…":"@me")'/]

  •   //标题长度超过28个字符则截取前28个字符,并加上省略号
        {/dede:arclist}

    非凡技术导航 优秀网址导航免费网站收录 网站地图

    本站收录的网站若侵害到您的利益,请联系我们删除处理

    Copyright ©2020 Guojiz V 5.5All Rights Reserved.

    备案号 )| 1735737677|