Magento Get CMS Page Title

This one is very simple! Just a simple line of code that I’ve been using pretty extensively the past couple weeks.

<?php echo "<h1>" . $pageTitle = Mage::getSingleton('cms/page')->getTitle() . "</h1>"; ?>

Obviously you can get much more than the Title, such as keywords, any meta content, etc by simply changing the method from ->getTitle() to ->getContent(), ->getSomethingElse();

Have a Merry Christmas everyone!

Posted in Magento, Magento Enterprise, Magento Professional, PHP