public function view() { $pl = new PageList(); $pl->filterByPageTypeHandle('catalog'); $parentCID = Page::getCurrentPage()->getCollectionID(); $pl->filterByParentID($parentCID); $catalogs = $pl->getResults(); $this->set('catalogs', $catalogs); }
public function view() { $pl = new PageList(); $pl->filterByPageTypeHandle('product'); $parentCID = Page::getCurrentPage()->getCollectionID(); $pl->filterByParentID($parentCID); // $pl->filterByPath($path, $includeAllChildren = true) $products = $pl->getResults(); $this->set('products', $products); }
public static function getChildPage($cID, $ctHandle) { $pl = new PageList(); //Filters $pl->filterByParentID($cID); $pl->filterByPageTypeHandle($ctHandle); //Get the page List Results $res = $pl->get(1); return $res[0]; }
public function view() { $pl = new PageList(); $pl->filterByPageTypeHandle('product'); $paginator = $pl->getPagination(); $pagination = $paginator->renderDefaultView(); $this->set('products', $paginator->getCurrentPageResults()); $this->set('pagination', $pagination); $this->set('paginator', $paginator); }
public function view() { $pl = new PageList(); $pl->filterByPageTypeHandle('catalog'); $pages = $pl->getResults(); $shop_page = Page::getByPath('/shop'); $shop_page_id = $shop_page->getCollectionID(); $tree = $this->generatePageTree($pages, $shop_page_id); $this->set('catalogMenu', $tree); }
public function testFilterByTypeValid2() { $this->list->filterByPageTypeHandle(array('alternate', 'another')); $this->assertEquals(5, $this->list->getTotalResults()); }
/** * Filters by type of collection (using the handle field) * @param mixed $ptHandle */ public function filterByPageTypeHandle($ptHandle) { return parent::filterByPageTypeHandle($ptHandle); }