Exemple #1
0
 public function view($pageId, $languageId, $pageNumber)
 {
     Wasabi::loadLanguages($languageId);
     $this->loadModel('Wasabi/Cms.Pages');
     $page = $this->Pages->getForFrontend($pageId);
     $startPage = $this->Pages->getStartPage();
     $titleSuffix = Configure::read('Settings.Core.html_title_suffix');
     $instanceName = Configure::read('Settings.Core.instance_name');
     WasabiCms::page($page);
     WasabiCms::startPage($startPage);
     WasabiCms::titleSuffix($titleSuffix);
     WasabiCms::instanceName($instanceName);
     $page->initializeContentAreas();
     $this->viewBuilder()->theme($page->getTheme()->getNameForViewBuilder());
     $this->viewBuilder()->layout($page->getLayout()->name());
     $this->viewBuilder()->className($page->getTheme()->getViewClassNameForViewBuilder());
     $this->set(['page' => $page]);
 }
Exemple #2
0
 /**
  * Get the title for the given $entity.
  *
  * @param PublishableEntity $entity The entity, e.g. Page or Post.
  * @return string
  */
 protected function _getTitle($entity)
 {
     $title = $entity->page_title;
     if ((bool) $entity->display_page_title_suffix) {
         $title .= WasabiCms::titleSuffix();
     }
     return $title;
 }