Esempio n. 1
0
 /**
  * Load page data to the template.
  *
  * @param PageInterface $page
  */
 public function load(PageInterface $page)
 {
     $this->template->set('title', $page->getTitle());
     $this->template->set('meta_title', $page->getMetaTitle());
     $this->template->set('meta_keywords', $page->getMetaKeywords());
     $this->template->set('meta_description', $page->getMetaDescription());
 }
Esempio n. 2
0
 /**
  * Make the page breadcrumbs.
  *
  * @param PageInterface $page
  */
 public function make(PageInterface $page)
 {
     $breadcrumbs = [$page->getTitle() => $this->request->path()];
     $this->loadParent($page, $breadcrumbs);
     foreach (array_reverse($breadcrumbs) as $key => $url) {
         $this->breadcrumbs->add($key, $url);
     }
 }