AndyC Posted October 14, 2018 Posted October 14, 2018 Hi How can we remove the image blocks from Sub Categories on the default theme Thank You
LeeBrys Posted October 23, 2018 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 *}
AndyC Posted January 23, 2021 Author Posted January 23, 2021 (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, 2021 by AndyC
colorful-ant Posted January 23, 2021 Posted January 23, 2021 (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, 2021 by colorful-ant
AndyC Posted January 23, 2021 Author Posted January 23, 2021 Thank you... Working OK and just showing text
Traumflug Posted January 25, 2021 Posted January 25, 2021 (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, 2021 by Traumflug 1
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