Created
January 9, 2014 00:16
-
-
Save goldhat/8327213 to your computer and use it in GitHub Desktop.
Concrete5 Page List template that loads all blocks from the pages in the list and displays them.
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
defined('C5_EXECUTE') or die("Access Denied."); | |
$rssUrl = $showRss ? $controller->getRssUrl($b) : ''; | |
$th = Loader::helper('text'); | |
//$ih = Loader::helper('image'); //<--uncomment this line if displaying image attributes (see below) | |
//$dh = Loader::helper('date'); //<--uncomment this line if displaying dates (see below) | |
//Note that $nh (navigation helper) is already loaded for us by the controller (for legacy reasons) | |
?> | |
<div class="sixteen columns ccm-page-list testimonials"> | |
<?php foreach ($pages as $page): | |
// Prepare data for each page being listed... | |
$title = $th->entities($page->getCollectionName()); | |
$url = $nh->getLinkToCollection($page); | |
$target = ($page->getCollectionPointerExternalLink() != '' && $page->openCollectionPointerExternalLinkInNewWindow()) ? '_blank' : $page->getAttribute('nav_target'); | |
$target = empty($target) ? '_self' : $target; | |
$description = $page->getCollectionDescription(); | |
$description = $controller->truncateSummaries ? $th->shorten($description, $controller->truncateChars) : $description; | |
$description = $th->entities($description); | |
// load blocks | |
$blocks = $page->getBlocks(); | |
?> | |
<?php | |
foreach($blocks as $block) { | |
$block->display(); | |
} | |
?> | |
<?php endforeach; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment