michal95nh Posted February 2, 2019 Share Posted February 2, 2019 Hello. How can I display category description only for first page of pagination and bellow all products? Prestashop 1.7.5 Category.tpl {extends file='catalog/listing/product-list.tpl'} {block name='product_list_header'} <div class="block-category"> {if $category.description} <div id="category-description"> <h2 class="h1">{$category.name}</h2> <div class="category-description-full">{$category.description nofilter}</div> </div> {else} {$category.description nofilter} </div> {/if} </div> <hr class="my-5 pb-3"> {/block} {block name='product_list_subcategories'} <!-- {if isset($subcategories) && $subcategories} Subcategories <div id="subcategories" class="u-carousel uc-el-subcategories-items uc-nav w-auto"> <div class="row middle-gutters"> {foreach from=$subcategories item=subcategory} <article class="subcategories-items col-4 col-xxl-3"> {if $subcategory.id_image} <div class="product-thumbnail text-center mb-3"> <a href="{$subcategory.url}" title="{$subcategory.name}"> <img class="img-fluid" src="{$subcategory.image.small.url}" alt="{$subcategory.image.legend}"> </a> </div> <h2 class="h5 text-center py-1"><a class="subcategory-name" href="{$subcategory.url}">{$subcategory.name|truncate:20:'...'}</a></h2> {else} <h2 class="custom-title"><a class="subcategory-name" href="{$subcategory.url}">{$subcategory.name|truncate:20:'...'}</a></h2> {/if} </article> {/foreach} </div> </div> <hr class="mt-4 mb-5"> {/if} --> {/block} Link to comment Share on other sites More sharing options...
NemoPS Posted February 3, 2019 Share Posted February 3, 2019 Try with {if !isset($smarty.get.p)} --description -- {/if} Link to comment Share on other sites More sharing options...
michal95nh Posted February 12, 2019 Author Share Posted February 12, 2019 On 2/3/2019 at 2:47 PM, NemoPS said: Try with {if !isset($smarty.get.p)} --description -- {/if} Where I should put this in my category.tpl ? Link to comment Share on other sites More sharing options...
NemoPS Posted February 13, 2019 Share Posted February 13, 2019 It should be category.tpl, but it depends on the template. Also make sure you clear cache, it's a shot in the dark with 1.7 and you might need to find the actual file if you use a child theme 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