Mage_Catalog_Block_Category_View Class Reference

Inheritance diagram for Mage_Catalog_Block_Category_View:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 IsRssCatalogEnable ()
 IsTopCategory ()
 getRssLink ()
 getProductListHtml ()
 getCurrentCategory ()
 getCmsBlockHtml ()
 isProductMode ()
 isMixedMode ()
 isContentMode ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

Definition at line 34 of file View.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 36 of file View.php.

00037     {
00038         parent::_prepareLayout();
00039 
00040         $this->getLayout()->createBlock('catalog/breadcrumbs');
00041 
00042         if ($headBlock = $this->getLayout()->getBlock('head')) {
00043             if ($title = $this->getCurrentCategory()->getMetaTitle()) {
00044                 $headBlock->setTitle($title);
00045             }
00046             if ($description = $this->getCurrentCategory()->getMetaDescription()) {
00047                 $headBlock->setDescription($description);
00048             }
00049             if ($keywords = $this->getCurrentCategory()->getMetaKeywords()) {
00050                 $headBlock->setKeywords($keywords);
00051             }
00052             /*
00053             want to show rss feed in the url
00054             */
00055             if ($this->IsRssCatalogEnable() && $this->IsTopCategory()) {
00056                 $title = $this->helper('rss')->__('%s RSS Feed',$this->getCurrentCategory()->getName());
00057                 $headBlock->addItem('rss', $this->getRssLink(), 'title="'.$title.'"');
00058             }
00059         }
00060 
00061         return $this;
00062     }

getCmsBlockHtml (  ) 

Definition at line 97 of file View.php.

00098     {
00099         if (!$this->getData('cms_block_html')) {
00100             $html = $this->getLayout()->createBlock('cms/block')
00101                 ->setBlockId($this->getCurrentCategory()->getLandingPage())
00102                 ->toHtml();
00103             $this->setData('cms_block_html', $html);
00104         }
00105         return $this->getData('cms_block_html');
00106     }

getCurrentCategory (  ) 

Retrieve current category model object

Returns:
Mage_Catalog_Model_Category

Definition at line 89 of file View.php.

00090     {
00091         if (!$this->hasData('current_category')) {
00092             $this->setData('current_category', Mage::registry('current_category'));
00093         }
00094         return $this->getData('current_category');
00095     }

getProductListHtml (  ) 

Definition at line 79 of file View.php.

00080     {
00081         return $this->getChildHtml('product_list');
00082     }

getRssLink (  ) 

Definition at line 74 of file View.php.

00075     {
00076         return Mage::getUrl('rss/catalog/category',array('cid' => $this->getCurrentCategory()->getId(), 'store_id' => Mage::app()->getStore()->getId()));
00077     }

isContentMode (  ) 

Definition at line 118 of file View.php.

00119     {
00120         return $this->getCurrentCategory()->getDisplayMode()==Mage_Catalog_Model_Category::DM_PAGE;
00121     }

isMixedMode (  ) 

Definition at line 113 of file View.php.

00114     {
00115         return $this->getCurrentCategory()->getDisplayMode()==Mage_Catalog_Model_Category::DM_MIXED;
00116     }

isProductMode (  ) 

Definition at line 108 of file View.php.

00109     {
00110         return $this->getCurrentCategory()->getDisplayMode()==Mage_Catalog_Model_Category::DM_PRODUCT;
00111     }

IsRssCatalogEnable (  ) 

Definition at line 64 of file View.php.

00065     {
00066         return Mage::getStoreConfig('rss/catalog/category');
00067     }

IsTopCategory (  ) 

Definition at line 69 of file View.php.

00070     {
00071         return $this->getCurrentCategory()->getLevel()==2;
00072     }


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

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