function custom($PageID, $RevisionID = null, $Slug = NULL) { $this->output->cache(30); $Page = new mPage($PageID); if (empty($RevisionID)) { $Published = $Page->published; } else { $Published = new mPageRevision($RevisionID); } if (!$Page->is_loaded() || !$Published->is_loaded()) { redirect('/pages/notfound'); } data('Page', $Page); data('Published', $Published); data('MetaDescription', $Published->metadesc); $this->display('info'); }
function delete($PageID) { $Page = new mPage($PageID); $Page->delete(); redirect($_SERVER['HTTP_REFERER']); }
<h3>Other Pages</h3> <?php $Other = new mPage(); $All = $Other->list_all()->get(); ?> <ul> <?php foreach ($All as $OtherPage) { ?> <?php if (isset($Page) && $OtherPage->id() == $Page->id()) { continue; } ?> <li><a href="/<?php echo $OtherPage->url; ?> /<?php echo $OtherPage->id(); ?> "><?php echo $OtherPage->title; ?> </a></li> <?php } ?> </ul>