コード例 #1
0
ファイル: View.php プロジェクト: technomagegithub/olgo.nl
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->getLayout()->createBlock('catalog/breadcrumbs');
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         $category = $this->getCurrentCategory();
         if ($title = $category->getMetaTitle()) {
             $headBlock->setTitle($title);
         }
         if ($description = $category->getMetaDescription()) {
             $headBlock->setDescription($description);
         }
         if ($keywords = $category->getMetaKeywords()) {
             $headBlock->setKeywords($keywords);
         }
         if ($this->helper('catalog/category')->canUseCanonicalTag()) {
             $rewrite = Mage::getStoreConfig('web/seo/use_rewrites', Mage::app()->getStore()->getId());
             // Rewrite
             if ($rewrite == 1) {
                 $headBlock->removeItem('link_rel', $category->getUrl());
                 $headBlock->addLinkRel('canonical', Mage::getModel('seofilter/catalog_layer_filter_item')->getSpeakingFilterUrl(FALSE, TRUE));
             } else {
                 $headBlock->addLinkRel('canonical', $category->getUrl());
             }
         }
         /*
         want to show rss feed in the url
         */
         if ($this->IsRssCatalogEnable() && $this->IsTopCategory()) {
             $title = $this->helper('rss')->__('%s RSS Feed', $this->getCurrentCategory()->getName());
             $headBlock->addItem('rss', $this->getRssLink(), 'title="' . $title . '"');
         }
     }
     return $this;
 }
コード例 #2
0
ファイル: View.php プロジェクト: riversy/magento_corehacks
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $headBlock = $this->getLayout()->getBlock('head');
     if (($category = $this->getCurrentCategory()) && $this->getCurrentCategory()->getMetaTitle()) {
         $headBlock->setData('title', $category->getMetaTitle());
     }
 }
コード例 #3
0
ファイル: View.php プロジェクト: protechhelp/gamamba
 protected function _prepareLayout()
 {
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         if ($robots = $this->getCurrentCategory()->getMetaRobots()) {
             $headBlock->setRobots($robots);
         }
     }
     return parent::_prepareLayout();
 }