1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 13:11:52 +02:00

Page Navigation Menu

This commit is contained in:
Cameron 2013-02-01 01:32:43 -08:00
parent 2036cc7172
commit ef131c1642
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,32 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
if (!defined('e107_INIT')) { exit; }
class page_shortcodes extends e_shortcode
{
function sc_page_navigation($parm) // TODO when No $parm provided, auto-detect based on URL which book/chapters to display.
{
require_once(e_PLUGIN."page/e_sitelink.php");
$links = new page_sitelinks;
$data = $links->pageNav($parm);
$template = e107::getCoreTemplate('page','nav');
return e107::getNav()->render($data, $template) ;
}
}
?>

View File

@ -0,0 +1,19 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
if (!defined('e107_INIT')) { exit; }
$template = e107::getCoreTemplate('page','nav');
$text = e107::getParser()->parseTemplate("{PAGE_NAVIGATION}", true);
e107::getRender()->tablerender($template['caption'], $text, 'page-navigation-menu');
?>