mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
New page-menu and template
This commit is contained in:
parent
d684bab28c
commit
74167b183e
@ -530,7 +530,7 @@ class page_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
// fixed - last parameter (allinfo) should be false as getLayout method is returning non-usable formatted array
|
// fixed - last parameter (allinfo) should be false as getLayout method is returning non-usable formatted array
|
||||||
$templates = e107::getLayouts('', 'page', 'front', '', false, false);
|
$templates = e107::getLayouts('', 'page', 'front', '', false, false);
|
||||||
$templates['menu'] = "Sidebar"; // ie. a MENU item. //TODO
|
// $templates['menu'] = "Sidebar"; // ie. a MENU item. //TODO
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -78,20 +78,24 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
|||||||
|
|
||||||
#### No table render example template ####
|
#### No table render example template ####
|
||||||
$PAGE_TEMPLATE['custom']['start'] = '<div class="cpage_body">';
|
$PAGE_TEMPLATE['custom']['start'] = '<div class="cpage_body">';
|
||||||
|
|
||||||
$PAGE_TEMPLATE['custom']['body'] = '';
|
$PAGE_TEMPLATE['custom']['body'] = '';
|
||||||
|
|
||||||
$PAGE_TEMPLATE['custom']['authorize'] = '
|
$PAGE_TEMPLATE['custom']['authorize'] = '
|
||||||
|
|
||||||
';
|
';
|
||||||
|
|
||||||
$PAGE_TEMPLATE['custom']['restricted'] = '
|
$PAGE_TEMPLATE['custom']['restricted'] = '
|
||||||
|
|
||||||
';
|
';
|
||||||
|
|
||||||
$PAGE_TEMPLATE['custom']['end'] = '</div>';
|
$PAGE_TEMPLATE['custom']['end'] = '</div>';
|
||||||
|
|
||||||
|
|
||||||
$PAGE_TEMPLATE['custom']['noTableRender'] = true;
|
$PAGE_TEMPLATE['custom']['noTableRender'] = true;
|
||||||
$PAGE_TEMPLATE['custom']['tableRender'] = '';
|
$PAGE_TEMPLATE['custom']['tableRender'] = '';
|
||||||
|
|
||||||
|
|
||||||
|
#### Panel Template - Used by e107_plugins/page/page_menu.php
|
||||||
|
$PAGE_TEMPLATE['panel']['start'] = '';
|
||||||
|
$PAGE_TEMPLATE['panel']['body'] = '{CPAGEBODY}';
|
||||||
|
$PAGE_TEMPLATE['panel']['authorize'] = '';
|
||||||
|
$PAGE_TEMPLATE['panel']['restricted'] = '';
|
||||||
|
$PAGE_TEMPLATE['panel']['end'] = '';
|
||||||
|
$PAGE_TEMPLATE['panel']['noTableRender'] = false;
|
||||||
|
$PAGE_TEMPLATE['panel']['tableRender'] = '';
|
||||||
|
|
||||||
|
26
e107_plugins/page/page_menu.php
Normal file
26
e107_plugins/page/page_menu.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
|
|
||||||
|
$sql = e107::getDb();
|
||||||
|
$ns = e107::getRender();
|
||||||
|
$tp = e107::getParser();
|
||||||
|
|
||||||
|
$template = e107::getCoreTemplate('page','panel');
|
||||||
|
|
||||||
|
//TODO Limits and cache etc.
|
||||||
|
$data = $sql->retrieve("SELECT * FROM #page WHERE page_class IN (".USERCLASS_LIST.") AND FIND_IN_SET('panel', page_template) LIMIT 3", true);
|
||||||
|
|
||||||
|
//TODO Use shortcodes and template.
|
||||||
|
foreach($data as $row)
|
||||||
|
{
|
||||||
|
$title = $tp->toHtml($row['page_title'],false,'TITLE');
|
||||||
|
$body = $tp->toHtml($row['page_text'],true,'BODY');
|
||||||
|
|
||||||
|
|
||||||
|
$ns->tablerender($title, $body,'page-menu'); // check for $mode == 'page-menu' in tablestyle() if you need a simple 'echo' without rendering styles.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user