Example #1
0
 protected function assignTemplate()
 {
     parent::assignTemplate();
     $this->vars['postId'] = $this->postId;
     $this->vars['postList'] = $this->postList;
     $this->vars['homepage'] = $this->homepage;
     $this->vars['postType'] = $this->postType;
     if ($this->homepage) {
         $this->vars['page_type'] .= ' home';
     }
     if ($this->postId) {
         $this->vars['page_type'] .= ' ' . $this->postType . '-id-' . $this->postId;
     }
     if (isset($this->object['post_content'])) {
         $this->vars['content'] = $this->object['post_content'];
     }
     $this->vars['site_title'] = $this->model->optionWithName('blogname');
     $this->vars['site_description'] = $this->model->optionWithName('blogdescription');
     if (isset($this->object['post_title'])) {
         $this->vars['title'] = $this->object['post_title'];
     } else {
         $this->vars['title'] = null;
     }
     if (!strlen($this->vars['page_title'])) {
         $this->vars['page_title'] = (strlen($this->vars['title']) ? $this->vars['title'] . ' • ' : '') . $this->vars['site_title'];
     }
 }
Example #2
0
 protected function assignTemplate()
 {
     parent::assignTemplate();
     $uri = $this->request->pageUri;
     if (strlen($uri) > 1 && substr($uri, -1) == '/') {
         $uri = substr($uri, 0, -1);
     }
     $this->links[] = array('href' => $uri . '.rdf', 'type' => 'application/rdf+xml', 'rel' => 'alternate');
 }
Example #3
0
 protected function assignTemplate()
 {
     global $ADMIN_ROUTES;
     parent::assignTemplate();
     $perms = array();
     if (isset($this->session->user) && isset($this->session->user['perms'])) {
         $perms = $this->session->user['perms'];
     }
     $this->vars['global_nav'] = array();
     foreach ($ADMIN_ROUTES as $k => $route) {
         if (!isset($route['require']) || in_array($route['require'], $perms)) {
             $this->vars['global_nav'][$k] = array('name' => $route['title'], 'link' => $this->request->root . $k . '/', 'class' => $route['linkClass']);
         }
     }
     $this->vars['global_nav']['logout'] = array('name' => 'Sign out', 'link' => $this->request->root . 'login/?logout=' . $this->session->nonce, 'class' => 'logout');
 }
Example #4
0
 protected function assignTemplate()
 {
     parent::assignTemplate();
     $this->vars['episode'] = $this->episode;
     $this->vars['version'] = $this->object;
 }
Example #5
0
 protected function assignTemplate()
 {
     parent::assignTemplate();
     $this->vars['blq'] = $this->blq;
 }