Jump to content

Length category short description length


Recommended Posts

I tried modifying the description length in category.tpl from 350 to 1000 without any success.

 

                           {if Tools::strlen($category->description) > 1000}
                                <div id="category_description_short">{$description_short|truncate:1000}</div>
                                <div id="category_description_full" class="unvisible">{$category->description}</div>
                                <a href="{$link->getCategoryLink($category->id_category, $category.link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more" title="{l s='More'}">{l s='More'}</a>
                            {else}
                                <div>{$category->description}</div>
... and ...

                           {if Tools::strlen($category->description) > 1000}
                                <div id="category_description_short" class="rte">{$description_short|truncate:1000}</div>
                                <div id="category_description_full" class="unvisible rte">{$category->description}</div>
                                <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more" title="{l s='More'}">{l s='More'}</a>
                            {else}
                                <div class="rte">{$category->description}</div>
                            {/if}
                            </div>

 

http://192.185.4.162/~kmsafari/index.php?id_category=51&controller=category&id_lang=1&live_configurator_token=382fc8a673b64a66f62c9dc23b056268&id_shop=1&id_employee=1&theme=&theme_font=

 

Any ideas?

 

Thanks.
 

Link to comment
Share on other sites

So I figured this out.

 

1. In the second section of the code, change the number from 1000 to 1250. This gives me plenty of room for content.

 

2. In the short description line, change the class to "unvisible rte".

 

3. In the long description line, remove the word "unvisible".

 

Now it works the way it's supposed to, or as I wish it to work.

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...