tarmouti Posted July 29, 2014 Share Posted July 29, 2014 (edited) Hi! I would like to ask how to change category description length? I found category.tpl file and this line twice: {if Tools::strlen($category->description) > 350} Is it enough to change the value 350? Thank you in advance. Edited July 29, 2014 by tcovoc (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2014 Share Posted July 30, 2014 hello what theme you use? result of if condition you mentione decide what description to display if category->description has got more than 350 chars - presatshop will display description short if category->description contains less than 350 chars - prestashop will display description Link to comment Share on other sites More sharing options...
tarmouti Posted July 30, 2014 Author Share Posted July 30, 2014 Template is Spices and Seasonings. http://www.templatemonster.com/prestashop-themes/48889.html Here you can check my category.tpl file: http://codepad.org/m6o7y14j How it can be done in the default template? Link to comment Share on other sites More sharing options...
BoKr Posted September 12, 2014 Share Posted September 12, 2014 Hello Vekia I am hitting a wall. I want to show at least 8 lines of category description. Shoudl be more than 350 chars... I tried all possibillities in category.tpl. I incresed/decreased in all combinations the two truncate options. But nothing happend. The shop did not show any line more Perhaps you can help me to turn the screw. {if $category->description} <div class="cat_desc rte"> {if Tools::strlen($category->description) >20} <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} </div> {else} <!-- Category image --> <!-- <div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; min-height:{$categorySize.height}px;"{/if}> --> {if $category->description} <div class="cat_desc"> <span class="category-name"> {strip} {$category->name|escape:'html':'UTF-8'} {if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'} {/if} {/strip} </span> {if Tools::strlen($category->description) > 350} <div id="category_description_short" class="rte">{$description_short}</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">{l s='More'}</a> {else} <div class="rte">{$category->description}</div> {/if} </div> {/if} Link to comment Share on other sites More sharing options...
El Patron Posted September 12, 2014 Share Posted September 12, 2014 actually you 'may' not do not want to do this. if you do, make sure to check your sitemap, this may mess up your seo if to long, hence the limitation. Link to comment Share on other sites More sharing options...
BoKr Posted September 13, 2014 Share Posted September 13, 2014 El Patron, thank you for your kind warning. We are talking about the category and sub-cat. description text? If so, do you got a link for me for more information, please? I am asking since excactly that was what was on my mind. To grant shop visitors a more pleasant usability and informational effect and at the same time to give the 'SEO algos' of the Google bot a bit to digest. I do not know - and am highly interested in more information on this - wheather the bot is interestes in 'hidden' text. May be via the way in the category.tpl or via javascript. But since we write the year ... I bet the bot know how to read hidden text and stacks it on the hive So, it is new to me that adequate text describing a category of stuff could harm SEO. with regards Boris Link to comment Share on other sites More sharing options...
El Patron Posted September 13, 2014 Share Posted September 13, 2014 I do not 'know' if this create issue, just something to consider. I would create sitemap with extended category and then run that sitmap through various sitemap analyzers, especially google. review your existing sitemap, then edit it and add more category text, then test it through sitemap analyzer 1 Link to comment Share on other sites More sharing options...
BoKr Posted September 13, 2014 Share Posted September 13, 2014 Thank you. I will follow your advice and see what happens. 1 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