1
0
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:
Cameron
2013-11-20 17:44:06 -08:00
parent c27b33963c
commit b0f717e416
6 changed files with 109 additions and 0 deletions

View File

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