Ejemplo n.º 1
0
 private function ReplacePageUrl(Page $page, Token $token, $startPos, &$endPos)
 {
     $params = $token->PropertyParams;
     if ($page->Equals(PageRenderer::Page())) {
         //merge current GET parameters on current page
         $params = array_merge(Request::GetArray(), $params);
     }
     $url = FrontendRouter::PageUrl($page, $params);
     $this->InsertValue($url, $token, $startPos, $endPos);
 }
Ejemplo n.º 2
0
 /**
  * Checks if the current navigation item points to a parent of the current page
  * @return boolean Returns true if the current page is a child of the current item
  */
 private function IsTrail()
 {
     $pageItem = $this->naviItem->GetPageItem();
     if (!$pageItem) {
         return false;
     }
     $parent = PageRenderer::Page()->GetParent();
     $itemPage = $pageItem->GetPage();
     while ($parent) {
         if ($itemPage->Equals($parent)) {
             return true;
         }
         $parent = $parent->GetParent();
     }
     return false;
 }
Ejemplo n.º 3
0
 /**
  * Gets the currently rendered page (convenience function)
  * @return Core\Page;
  */
 protected final function CurrentPage()
 {
     return PageRenderer::Page();
 }