Pages

Tuesday, June 25, 2013

Magento pages in a drop down (html select box).

below is the code to show magento pages in a drop down box

<select name=”page”>
<?php foreach (Mage::getResourceModel(‘cms/page_collection’) as $page){ ?>
<option value=”<?php echo $page->getId() ?>”><?php echo $page->getTitle() ?></option>
<?php } ?>
</select>

No comments:

Post a Comment