mirror of
https://github.com/e107inc/e107.git
synced 2025-08-25 15:31:41 +02:00
New page-menu and template
This commit is contained in:
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.
|
||||
}
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user