Mister Denial Posted July 12, 2011 Share Posted July 12, 2011 Hello folks, does anyone know if there is a way to have the category description and image show up on the first page of the category only, and not to repeat on all subsequent pages? Thank you in advance for your help! Dan Link to comment Share on other sites More sharing options...
vivek tripathi Posted July 15, 2011 Share Posted July 15, 2011 please make more clear what exactly you want Link to comment Share on other sites More sharing options...
Mister Denial Posted July 15, 2011 Author Share Posted July 15, 2011 When you set up a category in BO, you can add description, friendly URL, metas, AND a category image. This image (just like the category description) will show up on the first page of the category, but also on all subsequent pages of the same category. I would like this image (and description) to only show up on the first page of the category, and not on the second, third, fourth, and so on. Only on the first page - a sort of intro to the category, if you like. Link to comment Share on other sites More sharing options...
vivek tripathi Posted August 1, 2011 Share Posted August 1, 2011 To show Category description and image on first page only you have to modify category.tpl here is the some time editior parse some code Ex. $link->getcatImageLink ..... So I have also attached text files replace following line in category.tpl {if $scenes} <!-- Scenes --> {include file="$tpl_dir./scenes.tpl" scenes=$scenes} {else} <!-- Category image --> {if $category->id_image} <div class="align_center"> <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /> </div> {/if} {/if} {if $category->description} <div class="cat_desc">{$category->description}</div> {/if} Replace with following code {if ($p==1) ||$p==''} {if $scenes} <!-- Scenes --> {include file="$tpl_dir./scenes.tpl" scenes=$scenes} {else} <!-- Category image --> {if $category->id_image} <div class="align_center"> <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /> </div> {/if} {/if} {if $category->description} <div class="cat_desc">{$category->description}</div> {/if} {/if} 3 Link to comment Share on other sites More sharing options...
Mister Denial Posted September 9, 2011 Author Share Posted September 9, 2011 Hi Vivek, thank you so very much for your assistance, it is much appreciated! Problem solved! Have a great day! Dan Link to comment Share on other sites More sharing options...
SaLiC Posted July 22, 2013 Share Posted July 22, 2013 Hi I Have the same question, Im using 1.5.2.0. I would also like for category description to only appear on page 1 of ?. I looked in category.tpl for the piece of code but it looks different, I tried to just replace the code I have with the new one you posted, but it gives me a fatal error. My code looks like this: {if $scenes} <!-- Scenes --> {include file="$tpl_dir./scenes.tpl" scenes=$scenes} {else} <!-- Category image --> {if $category->id_image} <div class="align_center"> <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /> </div> {/if} {/if} {if $category->description} <div class="cat_desc"> {if strlen($category->description) > 1500} <div id="category_description_short">{$category->description|truncate:1100}</div> <div id="category_description_full" style="display:none">{$category->description}</div> <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a> {else} <div>{$category->description}</div> {/if} </div> {/if} </div> {/if} It is not important for me to have the show more part in the description. It is not working properly anyways. I hope someone can help me Link to comment Share on other sites More sharing options...
vekia Posted July 22, 2013 Share Posted July 22, 2013 it's a bit old thread not related to the 1.5 version (tut here is for 1.3 ) Link to comment Share on other sites More sharing options...
Cvalya Posted July 21, 2014 Share Posted July 21, 2014 This link can help: http://www.prestashop.com/forums/topic/271159-%D0%B4%D0%B5%D0%BB%D0%B0%D0%B5%D0%BC-%D0%B2%D1%8B%D0%B2%D0%BE%D0%B4-%D0%BE%D0%BF%D0%B8%D1%81%D0%B0%D0%BD%D0%B8%D1%8F-%D0%BA%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D0%B8-%D1%82%D0%BE%D0%BB%D1%8C%D0%BA%D0%BE-%D0%BD%D0%B0-%D0%BF%D0%B5%D1%80%D0%B2/ Link to comment Share on other sites More sharing options...
vekia Posted July 22, 2014 Share Posted July 22, 2014 it will be great if it will be translated to english im a little affraid that not everyone knows cyrylica Link to comment Share on other sites More sharing options...
robbie007 Posted February 13, 2018 Share Posted February 13, 2018 Is there a solution for Prestashop 1.7 too??? 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