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:
parent
2036cc7172
commit
ef131c1642
32
e107_plugins/page/e_shortcode.php
Normal file
32
e107_plugins/page/e_shortcode.php
Normal 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) ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
19
e107_plugins/page/page_navigation_menu.php
Normal file
19
e107_plugins/page/page_navigation_menu.php
Normal 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');
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user