예제 #1
0
 public function getChildPages($parent)
 {
     $list = new PageList();
     $list->filterByExcludeNav(false);
     $list->sortByDisplayOrder();
     $list->filterByParentID($parent->getCollectionID());
     $pages = $list->getResults();
     return $pages;
 }
예제 #2
0
 /**
  * Sorts this list by display order
  */
 public function sortByDisplayOrder()
 {
     return parent::sortByDisplayOrder();
 }
예제 #3
0
 function get_forum_pages()
 {
     $c = Page::getCurrentPage();
     if ($c->getPageTypeHandle() == 'forum_post') {
         $parentCID = $c->getCollectionParentID();
         $forumPages = array(Page::getByID($parentCID));
     } else {
         $parentCID = $c->getCollectionID();
         if ($parentCID < 1 || $parentCID == false) {
             $parentCID = 1;
         }
         $fpl = new PageList();
         $fpl->sortByDisplayOrder();
         $fpl->filterByParentID($parentCID);
         $fpl->filterByAttribute('forum_category', true);
         $forumPages = $fpl->get();
         if (count($forumPages) < 2) {
             if ($c->getAttribute('forum_category')) {
                 $forumPages = array($c);
             }
         }
     }
     return $forumPages;
 }