Your cart is empty!
Define Menu Type
public function onBeforeDefineVikRestaurantsMenuType() : string
Fires while fetching the type of menu to use for the back-end of VikRestaurants.
Description
Plugins can use this filter to change the type of menu at runtime.
By default, VikRestaurants supports only 2 types of menu:
- horizontal, placed above the plugin contents (default one);
- leftboard, placed on the left side.
In case you wish to create your own layout, you can define all the required classes here:
/components/com_vikrestaurants/site/helpers/library/menu/[MENU_TYPE]/
All the layouts should be placed here instead:
/administrator/components/vikrestaurants/layouts/menu/[MENU_TYPE]/
In case the specified layout doesn't exist, an exception will be thrown.
Return Value
String. The type of the menu to use.
Example
The example below explains how to use the leftboard layout in place of the default one.
/**
* Trigger filter to allow the plugins to choose a specific type to
* use for the layout of the back-end menu.
*
* @return string The menu type to use.
*/
public function onBeforeDefineVikRestaurantsMenuType()
{
return 'leftboard';
}
Changelog
Version | Description |
---|---|
1.7 | Introduced. |
Last Update: 2023-12-29 14:15
Helpful?