Created
March 18, 2014 23:49
-
-
Save hissy/9632532 to your computer and use it in GitHub Desktop.
#concrete5 #PageList Force sort option from Page List Block template
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 | |
defined('C5_EXECUTE') or die("Access Denied."); | |
$rssUrl = $showRss ? $controller->getRssUrl($b) : ''; | |
$th = Loader::helper('text'); | |
// Get PageList again | |
$pl = $controller->getPageList(); | |
// Set sortby | |
$pl->sortBy('ak_example_attribute_handle','asc'); | |
// Get pages again | |
if ($pl->getItemsPerPage() > 0) { | |
$pages = $pl->getPage(); | |
} else { | |
$pages = $pl->get(); | |
} | |
?> | |
<div class="ccm-page-list"> | |
<?php foreach ($pages as $page): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment