INTJP Posted February 16, 2023 Share Posted February 16, 2023 (edited) Hi, I guess the title says it all. I am trying to hide the left column on a specific category page (id=24) on my shop n°2 in a multistores environnement. I don't know which file to edit and what I've tried does not work. Can't seem to find a viable solution on the forum. Thanks for your help ! Edited February 16, 2023 by INTJP (see edit history) Link to comment Share on other sites More sharing options...
INTJP Posted February 17, 2023 Author Share Posted February 17, 2023 Anyone please ? Link to comment Share on other sites More sharing options...
INTJP Posted February 17, 2023 Author Share Posted February 17, 2023 If that can help anyone Not sure this is the best viable option but this is all I can do not being a dev. A module would be more accurate so not to have to modify a file whenever you want to change the settings... file -> themes/yourtheme/templates/layouts/layout-both-columns.tpl Ligne 66 : {block name="left_column"} {*here your code to hide column on a specific category page id *} {if $category.id == 24} {else} <div id="left-column" class="col-xs-12 col-sm-4 col-md-3"> {if $page.page_name == 'product'} {hook h='displayLeftColumnProduct'} {else} {hook h="displayLeftColumn"} {/if} </div> {/if} {/block} and file -> /themes/yourtheme/templates/layouts/layout-left-column.tpl Ligne 31 : {block name='content_wrapper'} <div id="content-wrapper" class="js-content-wrapper {if $category.id == 24}{else}left-column col-xs-12 col-sm-8 col-md-9{/if}"> {hook h="displayContentWrapperTop"} {block name='content'} <p>Hello world! This is HTML5 Boilerplate.</p> {/block} {hook h="displayContentWrapperBottom"} </div> {/block} If you want to add several categories use this format : {if $category.id|in_array:['1', '5', '9', '18' .....]} do this {else} or do this {/if} In a multistores environnement use this instead : {if isset($shop) && $shop.id == 2 && $category.id == 24} 😉 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