_Veronika_ Posted April 23, 2024 Share Posted April 23, 2024 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, 2024 Share Posted April 23, 2024 @_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, 2024 Author Share Posted April 23, 2024 @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, 2024 Share Posted April 25, 2024 (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, 2024 by AddWeb Solution (see edit history) Link to comment Share on other sites More sharing options...
Prestashop Addict Posted April 27, 2024 Share Posted April 27, 2024 (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, 2024 by Prestashop Addict (see edit history) Link to comment Share on other sites More sharing options...
AmirRzd Posted June 28, 2024 Share Posted June 28, 2024 I just found a temporary and code-free solution: You can just copy this URL into your browser and hit enter: index.php/improve/design/themes/customize-layouts The complete URL should look like this: https://mysite.com/admin123/index.php/improve/design/themes/customize-layouts?_token=yVM87uigjo4dRtQernlTF364TxKdyyaAB-8Rt3o There was an option in previous versions called "Layout" but I could not find it in PrestaShop 8.1.7 --- If you need this URL, after you visited the URL, you could add it to quick access. --- From this page you could set the layout of almost all the pages of PrestaShop Classic theme. Left Column, Right Column, Full Width, Both Column. 1 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