-
-
Save hailwood/fc09f756a608d1a5bcdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* output: | |
array(3) [ | |
string (13) "Parking Fines" | |
string (5) "Rates" | |
string (18) "Harbour Facilities" | |
] | |
*/ | |
public function getCategoryPages(){ | |
$pages = Page::get('Page', "Category{$this->Category}=1")->where("ClassName != 'CategoryPage'")->sort('MenuTitle ASC'); | |
$list = new PaginatedList($pages, Controller::curr()->getRequest()); | |
$list->setPageLength(16); | |
//begin debug | |
$titles = array(); | |
foreach($list as $item){ | |
$titles[] = $item->MenuTitle; | |
} | |
sd($titles); | |
//debug kills page | |
return $list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment