Customer area menu items

@prazze - When you click the articles link, you are redirected in frontend, that is an area opened to everyone, not just to people that are logged in, therefore, the frontend does not have a left side sidebar.
 
@twisted1919, how do you create the submenu effect on the sidebar menu? I found here, how to create the submenus, but it looks like you have some script that runs on a click or the parent menu. How do you apply that?

Thanks
 
@corey34 - you shouldn't be concerned about that, if you add sub-items to your menu item, then mailwizz should take care of the rest for you. If it doesn't, share the code and we'll see why not.
 
OK, here is what I did:

Code:
$newItems = array();
    $_newItems  = array(
        array(
                'name'      => Yii::t('app', 'Profile Settings'),
                'icon'      => 'glyphicon-user',
                'active'    => 'api_keys',
                'route'     => null,
                'items'=>array(
                    array(
                        'name'      => Yii::t('app', 'Blog'),
                        'icon'      => 'glyphicon-pencil',
                        'active'    => 'api_keys',
                        'route'     => 'https://website.com/blog',
                        'active'    => false,
                    ),
                    array(
                        'name'      => Yii::t('app', 'Events'),
                        'icon'      => 'glyphicon-calendar',
                        'active'    => 'api_keys',
                        'route'     => 'https://website.com/event',
                        'active'    => strpos($route, 'https://website.com/event') === 0,
                    )
                ),
            ),
.......
 
@corey34 - an inner item should look like:
PHP:
// taken from:/apps/backend/components/web/widgets/LeftSideNavigationWidget.php
...
'monetization' => array(
    'name'      => Yii::t('app', 'Monetization'),
    'icon'      => 'glyphicon-credit-card',
    'active'    => array('payment_gateway', 'price_plans', 'orders', 'promo_codes', 'currencies', 'taxes'),
    'route'     => null,
    'items'     => array(
        array('url' => array('payment_gateways/index'), 'label' => Yii::t('app', 'Payment gateways'), 'active' => strpos($route, 'payment_gateway') === 0),
        array('url' => array('price_plans/index'), 'label' => Yii::t('app', 'Price plans'), 'active' => strpos($route, 'price_plans') === 0),
        array('url' => array('orders/index'), 'label' => Yii::t('app', 'Orders'), 'active' => strpos($route, 'orders') === 0),
        array('url' => array('promo_codes/index'), 'label' => Yii::t('app', 'Promo codes'), 'active' => strpos($route, 'promo_codes') === 0),
        array('url' => array('currencies/index'), 'label' => Yii::t('app', 'Currencies'), 'active' => strpos($route, 'currencies') === 0),
        array('url' => array('taxes/index'), 'label' => Yii::t('app', 'Taxes'), 'active' => strpos($route, 'taxes') === 0),
    ),
),
...
 
Hi all, a simple question.
I can create a menu item pointing a php file in the same directory of the extension ? If yes, in which way I can do ?
Thanks
 
I can create a menu item pointing a php file in the same directory of the extension ?
Don't do that. Register a controller and then add a menu item pointing to the registered controller. Have a look at the support tickets extension or backup manager extension to see how they register routes in menus.
 
PHP:
Code:
public function run()
{
        Yii::app()->hooks->addFilter('customer_left_navigation_menu_items', array($this, '_removeMenuItem'), 100);
}

Hi, is this still relevant? I added this as you described but the link is in the middle of the left menu list still. Thanks by the way, at least I have a link there now.

public function run()
{
Yii::app()->hooks->addFilter('customer_left_navigation_menu_items', array($this, '_addMenuItem'), 100);
}
 
Hi, is this still relevant? I added this as you described but the link is in the middle of the left menu list still. Thanks by the way, at least I have a link there now.

public function run()
{
Yii::app()->hooks->addFilter('customer_left_navigation_menu_items', array($this, '_addMenuItem'), 100);
}

Its actually showing as the last link in the customer menu. (I was logged in as admin) Thanks
 
Back
Top