Beispiel #1
0
 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');
 }
Beispiel #2
0
 function delete($PageID)
 {
     $Page = new mPage($PageID);
     $Page->delete();
     redirect($_SERVER['HTTP_REFERER']);
 }
Beispiel #3
0
<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>