mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 01:25:01 +02:00
Page support for single page with anchor navigation.
This commit is contained in:
@@ -30,6 +30,7 @@ class page_sitelink // include plugin-folder in the name.
|
||||
|
||||
function pageNav($parm='')
|
||||
{
|
||||
$frm = e107::getForm();
|
||||
$options = array();
|
||||
if(vartrue($parm))
|
||||
{
|
||||
@@ -70,9 +71,10 @@ class page_sitelink // include plugin-folder in the name.
|
||||
|
||||
$query = "SELECT * FROM #page WHERE ";
|
||||
$q = array();
|
||||
|
||||
if(vartrue($options['chapter']))
|
||||
{
|
||||
$q[] = "page_chapter = ".intval($options['chapter']);
|
||||
$q[] = "page_title !='' AND page_chapter = ".intval($options['chapter']);
|
||||
}
|
||||
elseif(vartrue($options['book']))
|
||||
{
|
||||
@@ -100,7 +102,7 @@ class page_sitelink // include plugin-folder in the name.
|
||||
'link_parent' => $row['page_chapter'],
|
||||
'link_open' => '',
|
||||
'link_class' => intval($row['page_class']),
|
||||
'link_active' => ($options['cpage'] && $row['page_id'] == $options['cpage']),
|
||||
'link_active' => ($options['cpage'] && $row['page_id'] == $options['cpage'])
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -10,9 +10,12 @@
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$template = e107::getCoreTemplate('page','nav');
|
||||
|
||||
|
||||
$parm = eHelper::scParams($parm);
|
||||
|
||||
$template = e107::getCoreTemplate('page',vartrue($parm['template'],'nav'), true, true); // always merge
|
||||
|
||||
$request = e107::getRegistry('core/pages/request');
|
||||
if($request && is_array($request))
|
||||
{
|
||||
|
Reference in New Issue
Block a user