public function topbar(Topbar $topbar)
 {
     foreach ($this->parents()->flip() as $item) {
         $topbar->append($item->url('edit'), $item->title());
     }
     $topbar->append($this->url('edit'), $this->title());
     if ($topbar->view == 'subpages/index') {
         $topbar->append($this->url('subpages'), l('subpages'));
     }
     $topbar->html .= new Snippet('languages', array('languages' => $this->site()->languages(), 'language' => $this->site()->language()));
 }
Example #2
0
 public function topbar(Topbar $topbar)
 {
     if ($topbar->view == 'options/index') {
         $topbar->append(purl('options'), l('metatags'));
     }
     if ($topbar->view == 'subpages/index') {
         $topbar->append($this->url('subpages'), l('subpages'));
     }
     $topbar->html .= new Snippet('languages', array('languages' => $this->languages(), 'language' => $this->language()));
 }