View Single Post
  #4  
Old 10-05-2014, 05:49 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: 4 product column on main page. how?

The best way to ditch the side column in X-cart 5 is to create a controller class that decorates XLite\View\Controller and redefines the getSidebarFirstHiddenTargets() method.

Here is an example from my new Magnifico theme:
Code:
namespace XLite\Module\Guru\Magnifico\View; /** * Controller main widget * */ class Controller extends \XLite\View\Controller implements \XLite\Base\IDecorator { /** * Define the pages where first sidebar will be hidden. * * @return array */ protected static function getSidebarFirstHiddenTargets() { $hiddenTargets = []; $hiddenTargets[] = 'main'; return array_merge( parent::getSidebarFirstHiddenTargets(), $hiddenTargets ); } }

This will remove the sidebar from the target "main" (home page) only.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote