Jump to content

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


GoldDigger

Recommended Posts

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

{$product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'}




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

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

  • Like 1
Link to comment
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后测试所改值是否合适。

我按照这个方法修改后,主页显示还是没有任何变化,是怎么回事啊?

Link to comment
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...