AndyC 67 Posted October 14, 2018 Hi How can we remove the image blocks from Sub Categories on the default theme Thank You Share this post Link to post Share on other sites
LeeBrys 2 Posted October 23, 2018 If you are using the default theme you can comment out lines 63 through 80 in the category.tpl folder. Be sure to use the proper smarty tags. i.e: {* unwanted content *} Share this post Link to post Share on other sites
AndyC 67 Posted January 23 (edited) Rather a old post of mine.. I tried this with Panda and it didn't work at all But I am trying again to remove the image block from categories . I have tried a few ideas from Prestashop but none work. So in the example below , once you open a category from either your side or top , you normally get all the other subcategories showing at the top All I want is the wording as the images take up too much space Or if there is a way to change the size of the image , but then remove the text Edited January 23 by AndyC Share this post Link to post Share on other sites
colorful-ant 105 Posted January 23 (edited) themes / panda / category.tpl you can delete it <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img"> {if $subcategory.id_image} {assign var='pro_image' value=$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')} {if isset($sttheme.retina) && $sttheme.retina}{assign var='pro_image_2x' value=$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default_2x')}{/if} <picture> {if isset($webp) && $webp} <!--[if IE 9]><video style="display: none;"><![endif]--> <source srcset="{$pro_image|regex_replace:'/\.jpg$/':'.webp'} {if isset($sttheme.retina) && $sttheme.retina},{$pro_image_2x|regex_replace:'/\.jpg$/':'.webp'} 2x{/if}" title="{$subcategory.name|escape:'html':'UTF-8'}" type="image/webp" > <!--[if IE 9]></video><![endif]--> {/if} <img src="{$pro_image}" {if isset($sttheme.retina) && $sttheme.retina} srcset="{$pro_image_2x} 2x"{/if} alt="Kategorie {$subcategory.name|escape:'html':'UTF-8'}" title="Kategorie {$subcategory.name|escape:'html':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /> </picture> {/if} </a> or comment out <!-- <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img"> {if $subcategory.id_image} {assign var='pro_image' value=$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')} {if isset($sttheme.retina) && $sttheme.retina}{assign var='pro_image_2x' value=$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default_2x')}{/if} <picture> {if isset($webp) && $webp} <!--[if IE 9]><video style="display: none;"><![endif]--> <source srcset="{$pro_image|regex_replace:'/\.jpg$/':'.webp'} {if isset($sttheme.retina) && $sttheme.retina},{$pro_image_2x|regex_replace:'/\.jpg$/':'.webp'} 2x{/if}" title="{$subcategory.name|escape:'html':'UTF-8'}" type="image/webp" > <!--[if IE 9]></video><![endif]--> {/if} <img src="{$pro_image}" {if isset($sttheme.retina) && $sttheme.retina} srcset="{$pro_image_2x} 2x"{/if} alt="Kategorie {$subcategory.name|escape:'html':'UTF-8'}" title="Kategorie {$subcategory.name|escape:'html':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /> </picture> {/if} </a> --> EDIT: subcategory without image Edited January 23 by colorful-ant Share this post Link to post Share on other sites
AndyC 67 Posted January 23 Thank you... Working OK and just showing text Share this post Link to post Share on other sites
Traumflug 821 Posted January 25 (edited) On 1/23/2021 at 11:23 PM, colorful-ant said: or comment out Better comment out with Smarty comment delimiters rather than HTML delimiters. Theses are {* and *}. HTML comments get interpreted and delivered to the browser. Smarty comments not, so it it improves performance a bit. P.S.: as one can see by the code coloring in your post, the HTML comment ends in line 7 already, because there's another HTML comment. This means invalid HTML. Another reason to use Smarty delimiters. Edited January 25 by Traumflug 1 Share this post Link to post Share on other sites
AndyC 67 Posted January 25 Thanks ,have changed to your suggestion Share this post Link to post Share on other sites