Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Single column on category/collection pages only

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 06-03-2015, 12:01 PM
 
jbreeze jbreeze is offline
 

Newbie
  
Join Date: May 2015
Posts: 4
 

Default Single column on category/collection pages only

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?
__________________
XC 5.2.4 business
Reply With Quote
  #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

The following user thanks mohammadUMAR for this useful post:
jbreeze (06-30-2015)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:06 PM.

   

 
X-Cart forums © 2001-2020