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

Changing the order of the 'blocks' in the left column

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 03-02-2016, 05:15 AM
 
xgarb xgarb is offline
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default Changing the order of the 'blocks' in the left column

How would I go about changing the order of the items in the left hand column?

I would like to have the latest posts (blog module) below the news.

Maybe later, other changes.
__________________
Core version: 5.5.xx
Reply With Quote
  #2  
Old 03-02-2016, 07:07 AM
 
xgarb xgarb is offline
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default Re: Changing the order of the 'blocks' in the left column

I remembered about the weighting system so I can directly edit the files like this:


/**
* Side-bar box for top news
*
* @ListChild (list="sidebar.single", weight="1000")
* @ListChild (list="sidebar.first", weight="1000")

and...

/**
* Recent posts widget (For menu, class heir)
*
* @ListChild (list="sidebar.single", zone="customer", weight="2000")
* @ListChild (list="sidebar.first", zone="customer", weight="2000")


but there is some way of 'deregistering' ListChild settings and reregistering them so changes aren't lost when a module is updated. I can't find this information.
__________________
Core version: 5.5.xx
Reply With Quote
  #3  
Old 03-02-2016, 11:55 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: Changing the order of the 'blocks' in the left column

You have many options for this. Here is a fairly comprehensive list: http://xcartguru.com/knowledge-base/x-cart-5-kb/x-cart-5-moving-classes-and-templates-in-lists/
__________________
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

The following 2 users thank totaltec for this useful post:
qualiteam (03-09-2016), xgarb (03-04-2016)
  #4  
Old 03-04-2016, 05:41 AM
 
xgarb xgarb is offline
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default Re: Changing the order of the 'blocks' in the left column

Thanks. I've added the below to the main.php file in my theme and it works nicely...

Code:
protected static function moveClassesInLists() { return array( 'XLite\Module\Client\ClientTwitterFeed\View\ClientTwitterFeed' => array( array('sidebar.single', 'customer'), array('sidebar.single', 500, 'customer'), ), 'XLite\Module\XC\News\View\TopNewsSideBar' => array( array('sidebar.single', 'customer'), array('sidebar.single', 1000, 'customer'), ), 'XLite\Module\QSL\WordPress\View\Plugins\RecentPosts\MenuSection' => array( array('sidebar.single', 'customer'), array('sidebar.single', 2000, 'customer'), ), ); }
__________________
Core version: 5.5.xx
Reply With Quote

The following user thanks xgarb for this useful post:
qualiteam (03-09-2016)
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:37 AM.

   

 
X-Cart forums © 2001-2020