Concrete5 Hard-Coded Page List

If you ever need to get a page list in Concrete5, this bit of code will get the first 3 pages of a certain page type (in this case, "article"). There's a ton more you can do with the page list object. I recommend digging into the on_start function within /concrete/blocks/page_list/controller for more.


= \PageType::getByHandle('article');
$list = new \PageList();
$pagination $list->getPagination();
$articles $pagination->getCurrentPageResults();