所以我正在构建一个自定义面包屑导航来列出所有筹款选项。这些页面使用了一个独特的布局,称为"fundraising_page."
Is there a way to grab the pages only if they have the"fundraising_page" layout?
到目前为止我有这个,无论它使用什么模板,它都会抓取每个页面。
所以我需要的只是列出使用"fundraising_page"
模板的页面。
<?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; ?>