/** * Title and Description * @param \Render\APIs\RootAPIv1\RootRenderAPI $rootApi * @param \Render\Unit $rootUnit */ private function insertTitleAndDescription($rootApi, $rootUnit) { // title $nav = $rootApi->getNavigation(); $currentPage = $nav->getPage($nav->getCurrentPageId()); $pageTitle = $currentPage->getTitle(); $title = $rootApi->getFormValue($rootUnit, 'titlePrefix', '') . $pageTitle . $rootApi->getFormValue($rootUnit, 'titleSuffix', ''); echo HtmlTagBuilder::title($title); // description $description = $currentPage->getDescription(); if ($description != '') { echo HtmlTagBuilder::meta()->set(array('name' => 'description', 'content' => $description)); } }