diff --git a/e107_plugins/page/e_shortcode.php b/e107_plugins/page/e_shortcode.php index 589731424..0e46c24ff 100644 --- a/e107_plugins/page/e_shortcode.php +++ b/e107_plugins/page/e_shortcode.php @@ -39,7 +39,9 @@ class page_shortcodes extends e_shortcode /** * Page Navigation - * @example {PAGE_NAVIGATION: template=navdoc&auto=1} in your Theme template. + * @example {PAGE_NAVIGATION: template=navdoc&auto=1} in your Theme template. + * @example {PAGE_NAVIGATION: chapter=4} + * @example {PAGE_NAVIGATION: book=3&pages=true} */ function sc_page_navigation($parm=null) // TODO when No $parm provided, auto-detect based on URL which book/chapters to display. { @@ -90,7 +92,7 @@ class page_shortcodes extends e_shortcode $parm = ''; } - + /** @var page_sitelink $links */ $links = e107::getAddon('page', 'e_sitelink'); $data = $links->pageNav($parm); diff --git a/e107_plugins/page/page_navigation_menu.php b/e107_plugins/page/page_navigation_menu.php index 7a808088d..9e44ae911 100644 --- a/e107_plugins/page/page_navigation_menu.php +++ b/e107_plugins/page/page_navigation_menu.php @@ -13,52 +13,12 @@ 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); $tmpl = e107::getCoreTemplate('chapter','nav',true,true); // always merge and allow override $template = $tmpl['showPage']; -/* -$request = e107::getRegistry('core/page/request'); -if($request && is_array($request)) -{ - switch ($request['action']) - { - case 'listChapters': - $parm['cbook'] = $request['id']; - $template = $tmpl['listChapters']; - break; - - case 'listPages': - $parm['cchapter'] = $request['id']; - $template = $tmpl['listPages']; - break; - - case 'showPage': - $parm['cpage'] = $request['id']; - break; - } -} -$expandable = vartrue($parm['expandable']); - -if($parm) $parm = http_build_query($parm, null, '&'); -else $parm = ''; - -### Retrieve -$links = e107::getAddon('page', 'e_sitelink'); -$data = $links->pageNav($parm); -if(isset($data['title']) && !vartrue($template['noAutoTitle'])) -{ - // use chapter title - $template['caption'] = $data['title']; - $data = $data['body']; -} - -if(empty($data)) return; -$text = e107::getNav()->render($data, $template) ;*/ $pg = new page_shortcodes; $text = $pg->sc_page_navigation($parm); @@ -68,12 +28,12 @@ $text = $pg->sc_page_navigation($parm); * 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'] .= "+-"; -} +}*/ ### Render