pommi Posted January 1, 2013 Share Posted January 1, 2013 I am creating a new theme for 1.5 and want to remove the right column on some pages. Everyone seems to be saying to use {if $page_name == 'product_list} {/if} in the footer tpl around the right column tag but this code doesn't seem to work. Regardless if I put product-list or index, the right column appears on every page still. Can some one please help, has something changed in 1.5?? Link to comment Share on other sites More sharing options...
tdr170 Posted January 1, 2013 Share Posted January 1, 2013 Typically I see this in css files not tpl files and is written as such right_column{display:none} If you look in the global.css file you will find several places where Left_column{display:none} is used. I am also working on a two column theme for 1.5 and use right_column{display:none} in global.css file along with center_column{width:736px}. My theme is two columns through out the entire site so I only had to change the two columns already in the file. My thought for you would be figure out what pages you do not want the right column and try adding the above to the css for that page. Here is an example: #orderconfirmation #left_column {display:none} #orderconfirmation #center_column{width:757px} Link to comment Share on other sites More sharing options...
pommi Posted January 1, 2013 Author Share Posted January 1, 2013 Thanks tdr170, I have seen that suggestion before (i.e removing it using css) although it would still cause the modules to load and for the sack of load time I prefer to remove the column oppose to just hiding it Link to comment Share on other sites More sharing options...
Suthichai Posted January 1, 2013 Share Posted January 1, 2013 (edited) open themes/your_theme/footer.tpl comment out these lines {* <div id="right_column" class="column grid_2 omega"> {$HOOK_RIGHT_COLUMN} </div> *} Edited January 2, 2013 by Suthichai (see edit history) 1 Link to comment Share on other sites More sharing options...
pommi Posted January 3, 2013 Author Share Posted January 3, 2013 Thanks for the suggestion Suthichai but that would hide it in all instances. I want the right column to appear in the product-list but not for index or authentication for example.. Link to comment Share on other sites More sharing options...
Suthichai Posted January 3, 2013 Share Posted January 3, 2013 In header.tpl, the code would goes something like this. <head> ... ... {if $page_name == 'authentication' || $page_name == 'index'} <!-- 2 columns, left + center --> {assign var='center_id' value='center_column_2'} {else} <!-- 3 columns left + right + center --> {assign var='center_id' value='center_column'} {/if} </head> <body> ... ... {if $center_id == "center_column"} <div id="left_column" class="column"> {$HOOK_LEFT_COLUMN} </div> <div id="right_column" class="column grid_2 omega"> {$HOOK_RIGHT_COLUMN} </div> {elseif $center_id == "center_column_2"} <div id="left_column" class="column"> {$HOOK_LEFT_COLUMN} </div> {/if} <!-- Center --> <div id="{$center_id}" class="clearfix"> HTH 2 Link to comment Share on other sites More sharing options...
muneeb456 Posted May 30, 2013 Share Posted May 30, 2013 (edited) Hi, came across this. Not sure if you still are looking for help, but for anyone else who may come across this. One easy way to save the processing time for the left and right columns, is to create an override for the appropriate controller and create an initContent() method with the following lines: $this->display_column_left = false; $this->display_column_right = false; For example: class OrderController extends OrderControllerCore { public function initContent() { $this->display_column_left = false; $this->display_column_right = false; parent::initContent(); } } Edited May 30, 2013 by muneeb456 (see edit history) Link to comment Share on other sites More sharing options...
pixep Posted August 15, 2013 Share Posted August 15, 2013 Hi, I came across this too. For people coming after: If you override "initContent" method, the problem is that some smarty variables won't get set properly, causing the central column not to rescale appropriately. A better solution is to override the "init" method, method that will set the corresponding variables from the FrontController class class OrderController extends OrderControllerCore { public function init() { $this->display_column_left = false; $this->display_column_right = false; parent::init(); } } Enjoy ! Link to comment Share on other sites More sharing options...
Recommended Posts