Hi, I would like to add a custom menu to the core CB menu.
It doesn't look like there is any options in Community Builder to add more menus to this menu?
What I want is to create a "back menu" to it, below the email menu, to go back to the User List.
The menu gets created in the file 'cb.menu.php' which I've had a look at.
But I'm not sure how to create and add a new custom menu into this file.
I've figured that a back menu can be created with a code looking something like this
Code:
// Back button:
$customMenu = array();
$customMenu['arrayPos'] = array( '_UE_MENU_MESSAGES' => array( '_UE_MENU_BACK' => null ) );
$customMenu['position'] = 'menuBar';
$customMenu['caption'] = CBTxt::T( 'UE_MENU_BACK', 'Back to user list' );
$customMenu['url'] = "index.php?option=com_comprofiler&view=userslist&searchmode=0";
$customMenu['target'] = '';
$customMenu['img'] = '<span class="fa fa-arrow-left"></span> ';
$customMenu['tooltip'] = CBTxt::T( 'UE_MENU_BACK_DESC', 'Back to user list' );
$this->addMenu( $customMenu );
I have temporarily created the back menu by just editing the 'Send Email' menu to be a back menu instead, which wasn't too hard as I don't need that menu when I already have a email field inside my Contact Tab.
But would like it a lot better to add a new menu into this file instead of modifying an existing one. But I'm not really sure how to do that.
I know it isn't preferable to edit a core file like this, but I don't really see any other way of doing this.