View Single Post
  #2  
Old 06-06-2015, 03:24 AM
 
mohammadUMAR mohammadUMAR is offline
 

Member
  
Join Date: May 2008
Posts: 25
 

Default Re: Single column on category/collection pages only

Quote:
Originally Posted by jbreeze
I am using the sportlife template, I want to use 2 column layout (main column + sidebar) but only on category/collection pages. Main "home" page I want want 1 column (no sidebars). Product pages seem to stay one column no matter what layout type is selected which is fine. Can't seem to find a setting for this in the admin area. Anyone know how to have home page display one column while internal pages use columns?


You can disable left column from a file called "Layout.php". the file is located under classes/XLite/Core/Layout.php.

Inside the layout.php, you will find following code which is responsible to show/hide left column on the pages you want.

/**
* Define the pages where first sidebar will be hidden.
* By default we hide it on:
* product page,
* cart page,
* checkout page
* checkout success (invoice) page
* payment page
*
* @return array
*/
protected function getSidebarFirstHiddenTargets()
{
return array(
'cart',
'product',
'checkout',
'checkoutPayment',
'checkoutSuccess',
);
}

/**
* Define the pages where second sidebar will be hidden.
* By default we hide it on:
* product page,
* cart page,
* checkout page
* checkout success (invoice) page
* payment page
*
* @return array
*/
protected function getSidebarSecondHiddenTargets()
{
return array(
'cart',
'product',
'checkout',
'checkoutPayment',
'checkoutSuccess',
);
}

// }}}
}
__________________
Mohammad UMAR
X-Cart Business 5.2.5
Reply With Quote