Hello All! I’m using Concrete CMS 9.3.9 and on one of my pages (We are Wize...) I’m using a custom page list to show a list of team members. However regardless of what settings, attributes or configuration I choose, I can only get the page list to show ONE PAGE. HELP!!! I’ve listed the custom page list template below. Please let me know if anyone can detect what the problem is…
<?php
defined('C5_EXECUTE') or die('Access Denied.');
$c = Page::getCurrentPage();
/** @var \Concrete\Core\Utility\Service\Text $th */
$th = Core::make('helper/text');
/** @var \Concrete\Core\Localization\Service\Date $dh */
$dh = Core::make('helper/date');
if (is_object($c) && $c->isEditMode() && $controller->isBlockEmpty()) {
?>
<div class="ccm-edit-mode-disabled-item"><?php echo t('Empty Page List Block.') ?></div>
<?php
} else {
?>
<div class="grid-x grid-margin-x">
<div class="cell">
<div class="ccm-block-page-list-wrapper">
<?php if (isset($pageListTitle) && $pageListTitle) {
?>
<div class="ccm-block-page-list-header">
<<?php echo $titleFormat; ?>><?php echo h($pageListTitle) ?></<?php echo $titleFormat; ?>>
</div>
<?php
} ?>
<?php if (isset($rssUrl) && $rssUrl) {
?>
<a href="<?php echo $rssUrl ?>" target="_blank" class="ccm-block-page-list-rss-feed">
<i class="fas fa-rss"></i>
</a>
<?php
} ?>
<div class="ccm-block-page-list-pages">
<?php
$includeEntryText = false;
if (
(isset($includeName) && $includeName)
||
(isset($includeDescription) && $includeDescription)
||
(isset($useButtonForLink) && $useButtonForLink)
) {
$includeEntryText = true;
}
foreach ($pages as $page) {
// Prepare data for each page being listed...
$buttonClasses = 'ccm-block-page-list-read-more';
$entryClasses = 'ccm-block-page-list-page-entry';
$title = $page->getCollectionName();
$target = '_self';
if ($page->getCollectionPointerExternalLink() != '') {
$url = $page->getCollectionPointerExternalLink();
if ($page->openCollectionPointerExternalLinkInNewWindow()) {
$target = '_blank';
}
} else {
$url = $page->getCollectionLink();
$target = $page->getAttribute('nav_target');
}
$description = $page->getCollectionDescription();
$description = $controller->truncateSummaries ? $th->wordSafeShortText($description, $controller->truncateChars) : $description;
$thumbnail = false;
if ($displayThumbnail) {
$thumbnail = $page->getAttribute('thumbnail');
}
if (is_object($thumbnail) && $includeEntryText) {
$entryClasses = 'ccm-block-page-list-page-entry-horizontal';
}
$date = $dh->formatDateTime($page->getCollectionDatePublic(), true);
$headshot = $page->getAttribute('wca_headshot')->getVersion()->getRelativePath();
//Other useful page data...
//$last_edited_by = $page->getVersionObject()->getVersionAuthorUserName();
/* DISPLAY PAGE OWNER NAME
* $page_owner = UserInfo::getByID($page->getCollectionUserID());
* if (is_object($page_owner)) {
* echo $page_owner->getUserDisplayName();
* }
*/
/* CUSTOM ATTRIBUTE EXAMPLES:
* $example_value = $page->getAttribute('example_attribute_handle', 'display');
*
* When you need the raw attribute value or object:
* $example_value = $page->getAttribute('example_attribute_handle');
*/
/* End data preparation. */
/* The HTML from here through "endforeach" is repeated for every item in the list... */ ?>
<div class="grid-x grid-margin-x <?php echo $entryClasses ?>">
<div class="text-center small-12 medium-4 staff-tile cell">
<a href="<?php echo h($url) ?>"><img src="<?php echo h($headshot) ?>" alt="<?php echo h($title); ?> - wize consultantz" placeholder="<?php echo h($title); ?>" /></a>
<p><small><?php echo h($description) ?></small></p>
<p class="lead"><?php echo h($title); ?><br /></p>
<p><a href="<?php echo h($url) ?>" class="small secondary button">Learn More</a></p>
</div>
</div>
<?php
} ?>
</div><!-- end .ccm-block-page-list-pages -->
<?php if (count($pages) == 0) { ?>
<div class="ccm-block-page-list-no-pages"><?php echo h($noResultsMessage) ?></div>
<?php } ?>
</div><!-- end .ccm-block-page-list-wrapper -->
</div>
</div>
<?php if ($showPagination) { ?>
<?php echo $pagination; ?>
<?php } ?>
<?php
} ?>