Mage_Cms_Block_Page Class Reference

Inheritance diagram for Mage_Cms_Block_Page:

Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getPage ()

Protected Member Functions

 _prepareLayout ()
 _toHtml ()


Detailed Description

Definition at line 34 of file Page.php.


Member Function Documentation

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 51 of file Page.php.

00052     {
00053         $page = $this->getPage();
00054 
00055         // show breadcrumbs
00056         if (Mage::getStoreConfig('web/default/show_cms_breadcrumbs')
00057             && ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs'))
00058             && ($page->getIdentifier()!==Mage::getStoreConfig('web/default/cms_home_page'))
00059             && ($page->getIdentifier()!==Mage::getStoreConfig('web/default/cms_no_route'))) {
00060                 $breadcrumbs->addCrumb('home', array('label'=>Mage::helper('cms')->__('Home'), 'title'=>Mage::helper('cms')->__('Go to Home Page'), 'link'=>Mage::getBaseUrl()));
00061                 $breadcrumbs->addCrumb('cms_page', array('label'=>$page->getTitle(), 'title'=>$page->getTitle()));
00062         }
00063 
00064         if ($root = $this->getLayout()->getBlock('root')) {
00065             $root->addBodyClass('cms-'.$page->getIdentifier());
00066         }
00067 
00068         if ($head = $this->getLayout()->getBlock('head')) {
00069             $head->setTitle($page->getTitle());
00070             $head->setKeywords($page->getMetaKeywords());
00071             $head->setDescription($page->getMetaDescription());
00072         }
00073     }

_toHtml (  )  [protected]

Override this method in descendants to produce html

Returns:
string

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 75 of file Page.php.

00076     {
00077         $processor = Mage::getModel('core/email_template_filter');
00078         $html = $processor->filter($this->getPage()->getContent());
00079         $html = $this->getMessagesBlock()->getGroupedHtml() . $html;
00080         return $html;
00081     }

getPage (  ) 

Definition at line 36 of file Page.php.

00037     {
00038         if (!$this->hasData('page')) {
00039             if ($this->getPageId()) {
00040                 $page = Mage::getModel('cms/page')
00041                     ->setStoreId(Mage::app()->getStore()->getId())
00042                     ->load($this->getPageId(), 'identifier');
00043             } else {
00044                 $page = Mage::getSingleton('cms/page');
00045             }
00046             $this->setData('page', $page);
00047         }
00048         return $this->getData('page');
00049     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:52 2009 for Magento by  doxygen 1.5.8