If you have a lot of CMS pages, or if you just like automation and organization then this little snippet might be of some help. This will add the link to every CMS page in a clickable list that can be styled and displayed on the template page that you are using for CMS pages.
<div> <span>Here I am</span> <?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; ?> </div>
1 comment. Leave new
I truly appreciate you taking the time to share this information with us.