Add items and link to menu customer

GlobalDIMA

Member
Hi all
Someone could help me and comment as I add the user menu a title and a link to be directed to my website?
 
Follow https://forum.mailwizz.com/threads/customer-area-menu-items.6/ and replace the _addMenuItem method from the article with this one:
PHP:
public function _addMenuItem(array $items = array())
{
    $newItems = array();
    $newItem  = array(
        'name'      => 'MY TITLE',
        'icon'      => 'glyphicon-book',
        'active'    => '',
        'route'     => 'http://www.google.com',
    );
    foreach ($items as $name => $value) {
        if ($name == 'dashboard') {
            $newItems['mylink'] = $newItem;  
        }
        $newItems[$name] = $value;
    }
    if (!isset($newItems['mylink'])) {
        $newItems['mylink'] = $newItem;
    }
    return $newItems;
}
 
Back
Top