mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
New {CMENU=menu-name} for use with Pages/Menus.
This commit is contained in:
@@ -8,11 +8,6 @@ function menu_shortcode($parm, $mode='')
|
|||||||
{
|
{
|
||||||
list($path,$echo) = explode(':', $parm);
|
list($path,$echo) = explode(':', $parm);
|
||||||
|
|
||||||
if($mode) // New in v2.x. eg. {MENU|feature-1} Renders a menu called 'feature-1' as found in the e107_page table See admin Pages/Menus .
|
|
||||||
{
|
|
||||||
return e107::getMenu()->renderMenu($mode, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(is_numeric($path)) // eg. {MENU=1} - renders area 1 as found in the e107_menu db table.
|
if(is_numeric($path)) // eg. {MENU=1} - renders area 1 as found in the e107_menu db table.
|
||||||
{
|
{
|
||||||
return e107::getMenu()->renderArea($parm);
|
return e107::getMenu()->renderArea($parm);
|
||||||
|
@@ -28,4 +28,14 @@ class page_shortcodes extends e_shortcode
|
|||||||
return e107::getNav()->render($data, $template) ;
|
return e107::getNav()->render($data, $template) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* New in v2.x. eg. {CMENU=feature-1} Renders a menu called 'feature-1' as found in the e107_page table See admin Pages/Menus .
|
||||||
|
*/
|
||||||
|
function sc_cmenu($parm='',$mode='')
|
||||||
|
{
|
||||||
|
return e107::getMenu()->renderMenu($parm, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user