Skip to content

Instantly share code, notes, and snippets.

@hissy
Last active December 21, 2015 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hissy/6361936 to your computer and use it in GitHub Desktop.
Save hissy/6361936 to your computer and use it in GitHub Desktop.
[concrete5] Hard code Page List block sample
<?php
$page_list = BlockType::getByHandle('page_list');
if (is_object($page_list) ) {
$page_list->controller->num = 5;
$page_list->controller->cParentID = $c->getCollectionParentID();
$page_list->controller->orderBy = 'display_asc';
$page_type = CollectionType::getByHandle('blog_entry');
if (is_object($page_type))
$page_list->controller->ctID = $page_type->getCollectionTypeID();
$page_list->render('view');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment