mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
New {CMENU=menu-name} for use with Pages/Menus.
This commit is contained in:
parent
5436e861f5
commit
652cda0b3b
@ -7,12 +7,7 @@ if(!defined('e107_INIT'))
|
||||
function menu_shortcode($parm, $mode='')
|
||||
{
|
||||
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.
|
||||
{
|
||||
return e107::getMenu()->renderArea($parm);
|
||||
|
@ -28,4 +28,14 @@ class page_shortcodes extends e_shortcode
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user