mirror of
https://github.com/e107inc/e107.git
synced 2025-08-30 17:50:12 +02:00
Pages/Menus: each book/chapter now has it's own template.
This commit is contained in:
@@ -410,6 +410,7 @@ CREATE TABLE page_chapters (
|
||||
chapter_manager tinyint(3) unsigned NOT NULL default '254',
|
||||
chapter_icon varchar(250) NOT NULL default '',
|
||||
chapter_order tinyint(3) unsigned NOT NULL default '0',
|
||||
chapter_template varchar(50) NOT NULL default '',
|
||||
PRIMARY KEY (chapter_id),
|
||||
KEY chapter_order (chapter_order)
|
||||
) ENGINE=MyISAM;
|
||||
|
105
e107_core/templates/chapter_template.php
Normal file
105
e107_core/templates/chapter_template.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?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)
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* Template for Book and Chapter Listings, as well as navigation on those pages.
|
||||
*/
|
||||
|
||||
|
||||
$CHAPTER_TEMPLATE['default']['listPages']['start'] = "<ul class='page-pages-list'>";
|
||||
$CHAPTER_TEMPLATE['default']['listPages']['item'] = "<li><a href='{CPAGEURL}'>{CPAGETITLE}</a></li>";
|
||||
$CHAPTER_TEMPLATE['default']['listPages']['end'] = "</ul>";
|
||||
|
||||
$CHAPTER_TEMPLATE['default']['listChapters']['start'] = "<ul class='page-chapters-list'>";
|
||||
$CHAPTER_TEMPLATE['default']['listChapters']['item'] = "<li><h4>{CHAPTER_NAME}</h4>{PAGES}";
|
||||
$CHAPTER_TEMPLATE['default']['listChapters']['end'] = "</ul>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['caption'] = "Articles";
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['start'] = '<ul class="page-nav">';
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['item'] = '
|
||||
<li>
|
||||
<a role="button" href="{LINK_URL}" >
|
||||
{LINK_NAME}
|
||||
</a>
|
||||
</li>
|
||||
';
|
||||
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['item_submenu'] = '
|
||||
<li>
|
||||
<a role="button" href="{LINK_URL}" >
|
||||
{LINK_NAME}
|
||||
</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['item_submenu_active'] = '
|
||||
<li class="active">
|
||||
<a role="button" href="{LINK_URL}">
|
||||
{LINK_IMAGE} {LINK_NAME}
|
||||
</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['item_active'] = '
|
||||
<li class="active">
|
||||
<a crole="button" href="{LINK_URL}">
|
||||
{LINK_IMAGE} {LINK_NAME}
|
||||
</a>
|
||||
</li>
|
||||
';
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['end'] = '</ul>';
|
||||
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['submenu_start'] = '<ul class="page-nav" id="page-nav-{LINK_PARENT}" role="menu" >';
|
||||
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['submenu_item'] = '
|
||||
<li role="menuitem" >
|
||||
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_NAME}</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['submenu_loweritem'] = '
|
||||
<li role="menuitem" >
|
||||
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_NAME}</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['submenu_loweritem_active'] = '
|
||||
<li role="menuitem" class="active">
|
||||
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_NAME}</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['submenu_item_active'] = '
|
||||
<li role="menuitem" class="active">
|
||||
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_NAME}</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listChapters']['submenu_end'] = '</ul>';
|
||||
|
||||
|
||||
$CHAPTER_TEMPLATE['nav']['listPages'] = $CHAPTER_TEMPLATE['nav']['listChapters'];
|
||||
$CHAPTER_TEMPLATE['nav']['showPage'] = $CHAPTER_TEMPLATE['nav']['listChapters'];
|
||||
|
||||
?>
|
@@ -96,96 +96,7 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Used by {PAGE_NAVIGATION} shortcode - uses Sitelink/Navigation Shortcodes eg. {LINK_NAME} */
|
||||
|
||||
$PAGE_TEMPLATE['nav']['caption'] = "Articles";
|
||||
|
||||
$PAGE_TEMPLATE['nav']['start'] = '<ul class="page-nav">';
|
||||
|
||||
// Main Link
|
||||
$PAGE_TEMPLATE['nav']['item'] = '
|
||||
<li>
|
||||
<a role="button" href="{LINK_URL}" >
|
||||
{LINK_NAME}
|
||||
</a>
|
||||
</li>
|
||||
';
|
||||
|
||||
// Main Link which has a sub menu.
|
||||
$PAGE_TEMPLATE['nav']['item_submenu'] = '
|
||||
<li>
|
||||
<a role="button" href="{LINK_URL}" >
|
||||
{LINK_NAME}
|
||||
</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
|
||||
$PAGE_TEMPLATE['nav']['item_submenu_active'] = '
|
||||
<li class="active">
|
||||
<a role="button" href="{LINK_URL}">
|
||||
{LINK_IMAGE} {LINK_NAME}
|
||||
</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
|
||||
$PAGE_TEMPLATE['nav']['item_active'] = '
|
||||
<li class="active">
|
||||
<a crole="button" href="{LINK_URL}">
|
||||
{LINK_IMAGE} {LINK_NAME}
|
||||
</a>
|
||||
</li>
|
||||
';
|
||||
|
||||
$PAGE_TEMPLATE['nav']['end'] = '</ul>';
|
||||
|
||||
|
||||
$PAGE_TEMPLATE['nav']['submenu_start'] = '<ul class="page-nav" id="page-nav-{LINK_PARENT}" role="menu" >';
|
||||
|
||||
|
||||
$PAGE_TEMPLATE['nav']['submenu_item'] = '
|
||||
<li role="menuitem" >
|
||||
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_NAME}</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
|
||||
$PAGE_TEMPLATE['nav']['submenu_loweritem'] = '
|
||||
<li role="menuitem" >
|
||||
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_NAME}</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
$PAGE_TEMPLATE['nav']['submenu_loweritem_active'] = '
|
||||
<li role="menuitem" class="active">
|
||||
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_NAME}</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
|
||||
$PAGE_TEMPLATE['nav']['submenu_item_active'] = '
|
||||
<li role="menuitem" class="active">
|
||||
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_NAME}</a>
|
||||
{LINK_SUB}
|
||||
</li>
|
||||
';
|
||||
|
||||
$PAGE_TEMPLATE['nav']['submenu_end'] = '</ul>';
|
||||
|
||||
|
||||
|
||||
$PAGE_TEMPLATE['listPages']['start'] = "<ul class='page-pages-list'>";
|
||||
$PAGE_TEMPLATE['listPages']['item'] = "<li><a href='{CPAGEURL}'>{CPAGETITLE}</a></li>";
|
||||
$PAGE_TEMPLATE['listPages']['end'] = "</ul>";
|
||||
|
||||
|
||||
$PAGE_TEMPLATE['listChapters']['start'] = "<ul class='page-chapters-list'>";
|
||||
$PAGE_TEMPLATE['listChapters']['item'] = "<li><h4>{CHAPTER_NAME}</h4>{PAGES}";
|
||||
$PAGE_TEMPLATE['listChapters']['end'] = "</ul>";
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user