animuz1 Posted October 4, 2015 Share Posted October 4, 2015 (edited) A year or so ago I decided to hide the category description text. Now i want to unhide it, but I forgot how i have hidden it. Can someone help me with this? Edit: this code worked for me {if $category->description}<div class="cat_desc rte">{if Tools::strlen($category->description) > 350}<div id="category_description_short">{$description_short}</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">{l s='More'}</a>{else}<div>{$category->description}</div>{/if}</div>{/if} Edited October 5, 2015 by animuz1 (see edit history) Link to comment Share on other sites More sharing options...
w3bsolutions Posted October 4, 2015 Share Posted October 4, 2015 That would be in your theme's category.tpl file. Add this code wherever you want the description, by default inside the "{if $scenes || $category->description || $category->id_image}" block: {if $category->description} <div class="cat_desc"> <p>{$category->description}</p> <a href="#" class="lnk_more">{l s='More'}</a> </div> {/if} Link to comment Share on other sites More sharing options...
animuz1 Posted October 4, 2015 Author Share Posted October 4, 2015 (edited) Thanks alot, that works, now i would like to have the text beneath my products, is that possible? See attachment Edited October 5, 2015 by animuz1 (see edit history) Link to comment Share on other sites More sharing options...
w3bsolutions Posted October 5, 2015 Share Posted October 5, 2015 Paste the same code inside the same file (category.tpl) right before this code (towards the end of the file): {elseif !isset($subcategories)} <p class="warning">{l s='There are no products in this category.'}</p> {/if} Link to comment Share on other sites More sharing options...
animuz1 Posted October 5, 2015 Author Share Posted October 5, 2015 (edited) I found a post on the forum that did exactly what i wanted: Pasted this in my category.tpl: {if $category->description}<div class="cat_desc rte">{if Tools::strlen($category->description) > 350}<div id="category_description_short">{$description_short}</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">{l s='More'}</a>{else}<div>{$category->description}</div>{/if}</div>{/if} Fire2, thank you so much for your help! Edited October 5, 2015 by animuz1 (see edit history) Link to comment Share on other sites More sharing options...
w3bsolutions Posted October 5, 2015 Share Posted October 5, 2015 You are welcome ;-), if you don't mind please edit the title on your first post and add the word "SOLVED". Thanks. Link to comment Share on other sites More sharing options...
animuz1 Posted October 6, 2015 Author Share Posted October 6, 2015 (edited) I am very happy with the result. Only ine problem is my text is too large and it automatically shortens it by creating a read more pull down, I do not wish to have this read more option, but have it visible at all times. How do i manage that? Edited October 6, 2015 by animuz1 (see edit history) Link to comment Share on other sites More sharing options...
w3bsolutions Posted October 6, 2015 Share Posted October 6, 2015 You would have to change the code you inserted: {if $category->description} <div class="cat_desc rte"> {if Tools::strlen($category->description) > 350} <div id="category_description_short">{$description_short}</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">{l s='More'}</a> {else} <div>{$category->description}</div> {/if} </div> {/if} to this: {if $category->description} <div class="cat_desc rte"> <div>{$category->description}</div> </div> {/if} Link to comment Share on other sites More sharing options...
animuz1 Posted October 6, 2015 Author Share Posted October 6, 2015 Thanks so much again Fire2, I have sent you a PM. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now