X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Changing the order of the 'blocks' in the left column (https://forum.x-cart.com/showthread.php?t=73662)

xgarb 03-02-2016 05:15 AM

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.

xgarb 03-02-2016 07:07 AM

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.

totaltec 03-02-2016 11:55 AM

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/

xgarb 03-04-2016 05:41 AM

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'),
            ),
        );
    }       



All times are GMT -8. The time now is 05:23 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.