1
0
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:
Cameron 2013-03-11 05:12:45 -07:00
parent 5436e861f5
commit 652cda0b3b
2 changed files with 11 additions and 6 deletions

View File

@ -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);

View File

@ -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);
}
}