mirror of
https://github.com/e107inc/e107.git
synced 2025-08-30 17:50:12 +02:00
Expanding Page-Navigation support added. (still a few glitches)
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
|
||||
|
||||
//FIXME XXX - This menu should call the {PAGE_NAVIGATION} shortcode instead of duplicating its code and automatically display all links.
|
||||
|
||||
$parm = eHelper::scParams($parm);
|
||||
@@ -40,6 +42,8 @@ if($request && is_array($request))
|
||||
}
|
||||
}
|
||||
|
||||
$expandable = vartrue($parm['expandable']);
|
||||
|
||||
if($parm) $parm = http_build_query($parm, null, '&');
|
||||
else $parm = '';
|
||||
|
||||
@@ -56,6 +60,18 @@ if(isset($data['title']) && !vartrue($template['noAutoTitle']))
|
||||
if(empty($data)) return;
|
||||
$text = e107::getNav()->render($data, $template) ;
|
||||
|
||||
/**
|
||||
* Expandable menu support.
|
||||
* @see jquery.page.navigation.js . activate with expandable=1 in the page-navigation menu.
|
||||
* For best results include: e107::css('page', 'css/page.navigation.css', 'jquery'); in theme.php
|
||||
*/
|
||||
if($expandable)
|
||||
{
|
||||
e107::js('page','js/jquery.page.navigation.js','jquery');
|
||||
$template['caption'] .= "<span class='btn-group pull-right'><a class='btn btn-mini' id='page-nav-expand'>+</a><a class='btn btn-mini' id='page-nav-collapse'>-</a></span>";
|
||||
}
|
||||
|
||||
|
||||
### Render
|
||||
e107::getRender()->tablerender($template['caption'], $text, 'page-navigation-menu');
|
||||
|
||||
|
Reference in New Issue
Block a user