Jump to content

[已解决] 这里的标题如何改成可以2行显示,或者根据标题字数自动换行显示?

Recommended Posts

1. 备份后打开modules/homefeatured/homefeatured.tpl,找到:


2. 在{$product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'}里,修改truncate后面的27为你觉得合适的值。

3. 清空smarty caches后测试所改值是否合适。

  • Like 1

Share this post

Link to post
Share on other sites
  • 11 months later...

1. 备份后打开modules/homefeatured/homefeatured.tpl,找到:<br/>

<br/><h5><a href="{$product.link}" title="{$product.name|truncate:32:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'}</a></h5><br/>

<br/><br/><br/>2. 在{$product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'}里,修改truncate后面的27为你觉得合适的值。<br/><br/>3. 清空smarty caches后测试所改值是否合适。


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More