So I'm building a custom breadcrumb nav to list all fundraising options. The pages are using a unique layout called "fundraising_page."
Is there a way to grab the pages only if they have the "fundraising_page" layout?
So far I have this, which is grabbing every page regardless of the template it is using.
So what I need is only to list the pages that are using the "fundraising_page"
template.
<?php $collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());?>
<?php $collection->getSelect()->where('is_active = 1'); ?>
<ul>
<?php foreach ($collection as $page): ?>
<?php $PageData = $page->getData(); ?>
<?php if($PageData['identifier']!='no-route'){ ?>
<li>
<a href="/<?php echo $PageData['identifier']?>"><?php echo $PageData['title'] ?></a>
</li>
<?php } ?>
<?php endforeach; ?>