mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
{MENU} now supports the v2.x format: {MENU: path=xxxx&count=x} etc. for embedded menus.
This commit is contained in:
@@ -6,6 +6,21 @@ if(!defined('e107_INIT'))
|
|||||||
|
|
||||||
function menu_shortcode($parm, $mode='')
|
function menu_shortcode($parm, $mode='')
|
||||||
{
|
{
|
||||||
|
if(is_array($parm)) //v2.x format allowing for parms. {MENU: path=y&count=x}
|
||||||
|
{
|
||||||
|
list($plugin,$menu) = explode("/",$parm['path'],2);
|
||||||
|
if($menu == '')
|
||||||
|
{
|
||||||
|
$menu = $plugin;
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($parm['path']);
|
||||||
|
return e107::getMenu()->renderMenu($plugin,$menu."_menu", http_build_query($parm,'&'));
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
list($path,$echo) = explode(':', $parm);
|
list($path,$echo) = explode(':', $parm);
|
||||||
|
|
||||||
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.
|
||||||
@@ -23,6 +38,7 @@ function menu_shortcode($parm, $mode='')
|
|||||||
|
|
||||||
return e107::getMenu()->renderMenu($plugin,$menu."_menu");
|
return e107::getMenu()->renderMenu($plugin,$menu."_menu");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user