1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00
php-e107/e107_plugins/page/page_menu.php

26 lines
677 B
PHP
Raw Normal View History

2012-12-16 20:59:14 -08:00
<?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.
}
?>