khaledsaied Posted December 26, 2013 Share Posted December 26, 2013 (edited) Hi I am running PS 1.5.6.1 and not default template. I need to remove left column hook for both the homepage and the cms page with id number 9. Here is the code in header.tpl that did not work 100% as intended: {if $page_name == "cms" AND $smarty.get.id_cms != '9' AND $page_name != "index"} <div id="leo-leftcol" class="span3"> {$HOOK_LEFT_COLUMN} </div><!--leftcol--> {/if} The problem is that for some reason it also removes the left column hook on other pages which I don't want. It should only remove it on the homepage and cms page 9. I looked into about 5 post's with this question but none of the solutions solved my issue 100%. Can anyone help me? Thanks. Edited December 26, 2013 by khaledsaied (see edit history) 1 Link to comment Share on other sites More sharing options...
CartExpert.net Posted December 26, 2013 Share Posted December 26, 2013 Hi. Try this: {if !(($page_name == "cms" AND $smarty.get.id_cms == '9') OR ($page_name == "index"))} Regards.Robin.The CartExpert Team 3 Link to comment Share on other sites More sharing options...
vekia Posted December 26, 2013 Share Posted December 26, 2013 hello you said that you want to remove right column, but in your code i see: {$HOOK_LEFT_COLUMN} {if $page_name == "cms" AND $smarty.get.id_cms != '9' AND $page_name != "index"} <div id="leo-leftcol" class="span3"> {$HOOK_LEFT_COLUMN} </div><!--leftcol--> {/if} why left column? 1 Link to comment Share on other sites More sharing options...
khaledsaied Posted December 26, 2013 Author Share Posted December 26, 2013 Hi. Try this: {if !(($page_name == "cms" AND $smarty.get.id_cms == '9') OR ($page_name == "index"))} Regards. Robin. The CartExpert Team Thanks a lot that solved the problem - I will now try to expand it to contain more pages.. And sorry I meant the LEFT column, I have corrected it now 1 Link to comment Share on other sites More sharing options...
CartExpert.net Posted December 26, 2013 Share Posted December 26, 2013 No problem, the essential was the if statement's condition. Regards.Robin.The CartExpert Team 1 Link to comment Share on other sites More sharing options...
khaledsaied Posted December 26, 2013 Author Share Posted December 26, 2013 No problem, the essential was the if statement's condition. Regards. Robin. The CartExpert Team Yes I can see that now I have expanded the solution to cover multiple pages like this: {if !(($page_name == "cms" AND $smarty.get.id_cms == '9' OR $smarty.get.id_cms == '10') OR ($page_name == "index") OR ($page_name == "contact"))} 1 Link to comment Share on other sites More sharing options...
Kaious Posted January 24, 2015 Share Posted January 24, 2015 Hi... i'm sorry for reopening this post... but i can't hide left column in single cms page. When i insert the code that you show, i have two left colums in all cms page, instead of one column. Can help me pleaseee ? i'm going crazy if u want... the site is www.iconpoint.eu I need left column only on CATALOGO PRODOTTI. Thanks. Dany Link to comment Share on other sites More sharing options...
retrodrive Posted August 25, 2015 Share Posted August 25, 2015 I am having trouble with this also. From what I see, this code calls on: <div id="leo-leftcol" class="span3"> What is the actual code that it calls? Link to comment Share on other sites More sharing options...
Donnerberg Posted February 28, 2017 Share Posted February 28, 2017 Hi. Try this: {if !(($page_name == "cms" AND $smarty.get.id_cms == '9') OR ($page_name == "index"))} Regards. Robin. The CartExpert Team Can you tell me name of file where I need to add this code ? Many thanks, Nikola Link to comment Share on other sites More sharing options...
Donnerberg Posted February 28, 2017 Share Posted February 28, 2017 I have placed code in the bottom of header.tpl file, and everything WORKS just fine. CODE: <div class="columns-container"> <div id="columns" class="container"> {if $page_name !='index' && $page_name !='pagenotfound'} {include file="$tpl_dir./breadcrumb.tpl"} {/if} {if !(($page_name == "cms" AND $smarty.get.id_cms == '11') OR ($page_name == "index"))} <div class="row"> {if isset($left_column_size) && !empty($left_column_size)} <div id="left_column" class="column col-xs-12 col-sm-{$left_column_size|intval}">{$HOOK_LEFT_COLUMN}</div>{/if} {/if} <div id="center_column" class="center_column col-xs-12 col-sm-{12 - $left_column_size - $right_column_size}"> {/if} 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