_Veronika_ Posted April 23 Share Posted April 23 Hello everybody Im struggling with the configuration in the web, I want to show in brand page the left column but I want to hide it when all brands is showing. These pages seem to be connected because when I turn off the left column in theme setting disapears in both pages. Is there a way to hide in all brands page but show it in the manufacturer page??? Im using prestashop 8.1 and classic theme by default. Hope someone can help me, thanks Link to comment Share on other sites More sharing options...
Prestashop Addict Posted April 23 Share Posted April 23 @_Veronika_ you cannot do it with standard PS configuration. You can do it with small smarty code in template. Link to comment Share on other sites More sharing options...
_Veronika_ Posted April 23 Author Share Posted April 23 @Prestashop Addict thanks. Could you tell me which file I have to modify? Link to comment Share on other sites More sharing options...
AddWeb Solution Posted April 25 Share Posted April 25 (edited) On 4/23/2024 at 7:24 PM, _Veronika_ said: Hello everybody Im struggling with the configuration in the web, I want to show in brand page the left column but I want to hide it when all brands is showing. These pages seem to be connected because when I turn off the left column in theme setting disapears in both pages. Is there a way to hide in all brands page but show it in the manufacturer page??? Im using prestashop 8.1 and classic theme by default. Hope someone can help me, thanks Hi, In this directory, themes/classic/templates look for the code that usually enclosed within {block name="left_column"} and {/block} tags. Surround the code for the left column with a conditional statement that checks if the current page is a brand page or a manufacturer page. Sample code : {if $page.page_name == 'manufacturer' || $page.page_name == 'brand'} {block name="left_column"} // left column content here {/block} {/if} Clear the cache after making the changes and test if it works. I hope this would help. Thanks! Edited April 25 by AddWeb Solution (see edit history) Link to comment Share on other sites More sharing options...
Prestashop Addict Posted April 27 Share Posted April 27 (edited) Le 23/04/2024 à 5:30 PM, _Veronika_ a dit : @Prestashop Addict thanks. Could you tell me which file I have to modify? Here is a solution based on classic theme. In template layout-both-columns.tpl line 65 <div class="row"> {block name="left_column"} <div id="left-column" class="col-xs-12 col-md-4 col-lg-3"> {if $page.page_name == 'product'} {hook h='displayLeftColumnProduct' product=$product category=$category} {else} {hook h="displayLeftColumn"} {/if} </div> {/block} add <div class="row"> {block name="left_column"} {if $page.page_name != 'manufacturer' || isset($smarty.get.id_manufacturer)} <div id="left-column" class="col-xs-12 col-md-4 col-lg-3"> {if $page.page_name == 'product'} {hook h='displayLeftColumnProduct' product=$product category=$category} {else} {hook h="displayLeftColumn"} {/if} </div> {/if} {/block} Edited April 27 by Prestashop Addict (see edit history) 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