Example #1
0
 /**
 * Show a listing of all content.
 */
 public function Index()
 {
     $content = new CMContent();
     if (!isset($this->user->profile['hasRoleAdmin'])) {
         $urdata = array();
         $urdata['type'] = 'post';
         $this->views->SetTitle('Content Controller')->AddInclude(__DIR__ . '/index.tpl.php', array('user' => $this->user, 'content' => $content, 'contents' => $content->ListAll($urdata)));
     } else {
         $this->views->SetTitle('Content Controller')->AddInclude(__DIR__ . '/index.tpl.php', array('contents' => $content->ListAll()));
     }
 }
Example #2
0
 /**
 * The blog.
 */
 public function Blog()
 {
     $content = new CMContent();
     $this->views->SetTitle('My blog')->AddInclude(__DIR__ . '/blog.tpl.php', array('contents' => $content->ListAll(array('type' => 'post', 'order-by' => 'title', 'order-order' => 'DESC'))));
 }