Show collectionParent custom attribute in page list 5.6.2.1
Permalink
Here is my issue, I have a page that contains multiple pagelist blocks showing 4 Vendors from each Vendor category. Each category has a name and an icon that I want to display above the 4 child results. The issue I have now is that the parent title and icon are also repeating...I just want to show that once, with the four child pages underneath. Here is an example of what I am trying to duplicatehttp://www.foreverbride.com/local-vendors... .
Here is my code, again I need to limit the parent category name and icon to only show once:
If I move the "section_title" out of the foreach, it just displays home. Can someone help please? I am in a crunch and just cannot get it to click in.
Thanks!
Here is my code, again I need to limit the parent category name and icon to only show once:
<div class="ccm-page-list">
<div id="page_list_container">
<?php foreach ($pages as $page):
$vendor_cat_icon = $page->getAttribute('vendor_cat_icon');
$vendor_name = $page->getAttribute('vendor_name');
$thumb = $ih->getThumbnail($image, 250, 9999); //width, height
$description = $page->getCollectionDescription();
$title = $th->entities($page->getCollectionName());
$url = $nh->getLinkToCollection($page);
$target = ($page->getCollectionPointerExternalLink() != '' && $page->openCollectionPointerExternalLinkInNewWindow()) ? '_blank' : $page->getAttribute('nav_target');
$target = empty($target) ? '_self' : $target;
$teaser = $plth->getPageTeaser($page, 'Main', $teaserBlockCount, $teaserTruncateChars);
//$icon = $cobj->getAttribute('vendor_cat_icon');
?>
<div class="col-xs-12 section_title">Viewing 15 lines of 63 lines. View entire code block.
If I move the "section_title" out of the foreach, it just displays home. Can someone help please? I am in a crunch and just cannot get it to click in.
Thanks!