当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Catalog_Block_Product_Abstract::_prepareLayout方法代码示例

本文整理汇总了PHP中Mage_Catalog_Block_Product_Abstract::_prepareLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Catalog_Block_Product_Abstract::_prepareLayout方法的具体用法?PHP Mage_Catalog_Block_Product_Abstract::_prepareLayout怎么用?PHP Mage_Catalog_Block_Product_Abstract::_prepareLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Catalog_Block_Product_Abstract的用法示例。


在下文中一共展示了Mage_Catalog_Block_Product_Abstract::_prepareLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _prepareLayout

 protected function _prepareLayout()
 {
     if ($breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs')) {
         $breadcrumbsBlock->addCrumb('home', array('label' => Mage::helper('catalog')->__('Home'), 'title' => Mage::helper('catalog')->__('Go to Home Page'), 'link' => Mage::getBaseUrl()));
     }
     parent::_prepareLayout();
 }
开发者ID:sivaanil,项目名称:paytech,代码行数:7,代码来源:Newproductslist.php

示例2: _prepareLayout

 protected function _prepareLayout()
 {
     $title = $this->getHeaderText();
     $this->getLayout()->getBlock('head')->setTitle($title);
     $this->getLayout()->getBlock('root')->setHeaderTitle($title);
     return parent::_prepareLayout();
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:7,代码来源:Result.php

示例3: _prepareLayout

 /**
  * Preparing layout
  *
  * @return Mage_Catalog_Block_Product_Compare_List
  */
 protected function _prepareLayout()
 {
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         $headBlock->setTitle(AO::helper('catalog')->__('Compare Products List') . ' - ' . $headBlock->getDefaultTitle());
     }
     return parent::_prepareLayout();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:12,代码来源:Product_Compare_List.php

示例4: _prepareLayout

 /**
  * Add meta information from product to head block
  *
  * @return Mage_Catalog_Block_Product_View
  */
 protected function _prepareLayout()
 {
     $this->getLayout()->createBlock('catalog/breadcrumbs');
     $headBlock = $this->getLayout()->getBlock('head');
     if ($headBlock) {
         $product = $this->getProduct();
         $title = $product->getMetaTitle();
         if ($title) {
             $headBlock->setTitle($title);
         }
         $keyword = $product->getMetaKeyword();
         $currentCategory = Mage::registry('current_category');
         if ($keyword) {
             $headBlock->setKeywords($keyword);
         } elseif ($currentCategory) {
             $headBlock->setKeywords($product->getName());
         }
         $description = $product->getMetaDescription();
         if ($description) {
             $headBlock->setDescription($description);
         } else {
             $headBlock->setDescription(Mage::helper('core/string')->substr($product->getDescription(), 0, 255));
         }
         if ($this->helper('catalog/product')->canUseCanonicalTag()) {
             $params = array('_ignore_category' => true);
             $headBlock->addLinkRel('canonical', $product->getUrlModel()->getUrl($product, $params));
         }
     }
     return parent::_prepareLayout();
 }
开发者ID:beejhuff,项目名称:magento-1.13.0.2,代码行数:35,代码来源:View.php

示例5: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $toolbar = $this->getToolbarBlock();
     $collection = $this->getCollection();
     if ($orders = $this->getAvailableOrders()) {
         $toolbar->setAvailableOrders($orders);
     }
     if ($sort = $this->getSortBy()) {
         $toolbar->setDefaultOrder($sort);
     }
     if ($dir = $this->getDefaultDirection()) {
         $toolbar->setDefaultDirection($dir);
     }
     $toolbar->setCollection($collection);
     $this->setChild('toolbar', $toolbar);
     $this->getCollection()->load();
     $partner = $this->getProfileDetail();
     if ($partner->getShoptitle() != '') {
         $this->getLayout()->getBlock('head')->setTitle($partner->getShoptitle());
     } else {
         $this->getLayout()->getBlock('head')->setTitle($partner->getProfileurl());
     }
     $this->getLayout()->getBlock('head')->setKeywords($partner->getMetaKeyword());
     $this->getLayout()->getBlock('head')->setDescription($partner->getMetaDescription());
     return $this;
 }
开发者ID:axovel,项目名称:exqzt,代码行数:27,代码来源:Collection.php

示例6: _prepareLayout

 /**
  * Retrieve loaded category collection
  *
  * @return Mage_Eav_Model_Entity_Collection_Abstract
  */
 public function _prepareLayout()
 {
     /**
      * SEO Meta Keywords, title, descriptions for deal page
      */
     $STORE_CONFIG_SEO_META_TITLE = Mage::getStoreConfig('superdeals/seosettings/seotitle');
     /** getting seo keyword */
     $STORE_CONFIG_SEO_META_KEYWORDS = Mage::getStoreConfig('superdeals/seosettings/seokeyword');
     /** getting seo description */
     $STORE_CONFIG_SEO_META_DESCRIPTION = Mage::getStoreConfig('superdeals/seosettings/seodescription');
     /** getting head block */
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         /** set title */
         $headBlock->setTitle($STORE_CONFIG_SEO_META_TITLE);
         /** set keywords */
         $headBlock->setKeywords($STORE_CONFIG_SEO_META_KEYWORDS);
         /** set description */
         $headBlock->setDescription($STORE_CONFIG_SEO_META_DESCRIPTION);
     }
     /** breadcrumbs */
     $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
     /** add crumbs */
     $breadcrumbs->addCrumb('home', array('label' => Mage::helper('cms')->__('Home'), 'title' => Mage::helper('cms')->__('Home Page'), 'link' => Mage::getBaseUrl()));
     /** addcrumbs deals */
     $breadcrumbs->addCrumb('deals', array('label' => 'Deals', 'title' => 'Deals'));
     return parent::_prepareLayout();
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:32,代码来源:Index.php

示例7: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->setTemplate("affiliatepluswidget/products.phtml");
     $this->_prepareWidgetData();
     return $this;
 }
开发者ID:bigtailbear14,项目名称:rosstheme,代码行数:7,代码来源:Magestore_Affiliatepluswidget_Block_Products.php

示例8: _prepareLayout

 /**
  * Add meta information from product to head block
  *
  * @return Mage_Catalog_Block_Product_View
  */
 protected function _prepareLayout()
 {
     $this->getLayout()->createBlock('catalog/breadcrumbs');
     $headBlock = $this->getLayout()->getBlock('head');
     if ($headBlock) {
         $product = $this->getProduct();
         $title = $product->getMetaTitle();
         if ($title) {
             $headBlock->setTitle($title);
         }
         $keyword = $product->getMetaKeyword();
         $currentCategory = Mage::registry('current_category');
         if ($keyword) {
             $headBlock->setKeywords($keyword);
         } elseif ($currentCategory) {
             $headBlock->setKeywords($product->getName());
         }
         $description = $product->getMetaDescription();
         if ($description) {
             $headBlock->setDescription($description);
         } else {
             $headBlock->setDescription(Mage::helper('core/string')->substr($product->getDescription(), 0, 255));
         }
     }
     return Mage_Catalog_Block_Product_Abstract::_prepareLayout();
 }
开发者ID:purpleweb,项目名称:ImprovedLayeredNavigationFix,代码行数:31,代码来源:View.php

示例9: _prepareLayout

 /**
  * Add meta information from product to head block
  *
  * @return Mage_Catalog_Block_Product_View
  */
 protected function _prepareLayout()
 {
     $this->getLayout()->createBlock('catalog/breadcrumbs');
     $headBlock = $this->getLayout()->getBlock('head');
     if ($headBlock) {
         $title = $this->getProduct()->getMetaTitle();
         if ($title) {
             $headBlock->setTitle($title);
         }
         $keyword = $this->getProduct()->getMetaKeyword();
         $currentCategory = Mage::registry('current_category');
         if ($keyword) {
             $headBlock->setKeywords($keyword);
         } elseif ($currentCategory) {
             $headBlock->setKeywords($this->getProduct()->getName());
         }
         $description = $this->getProduct()->getMetaDescription();
         if ($description) {
             $headBlock->setDescription($description);
         } else {
             $headBlock->setDescription($this->getProduct()->getDescription());
         }
     }
     return parent::_prepareLayout();
 }
开发者ID:joebushi,项目名称:magento-mirror,代码行数:30,代码来源:View.php

示例10: _prepareLayout

 protected function _prepareLayout()
 {
     if ($breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs')) {
         $product = $this->getProduct();
         $sess = Mage::getSingleton('udropship/session');
         $searchUrlKey = $sess->getData('udsell_search_type') ? 'mysellSearch' : 'sellSearch';
         if ($sess->getData('udsell_search_type')) {
             $breadcrumbsBlock->addCrumb('sellyours', array('label' => Mage::helper('catalog')->__('My Sell List'), 'title' => Mage::helper('catalog')->__('My Sell List'), 'link' => $this->getUrl('udsell/index/mysellSearch')));
         } else {
             $breadcrumbsBlock->addCrumb('sellyours', array('label' => Mage::helper('catalog')->__('Sell Yours'), 'title' => Mage::helper('catalog')->__('Sell Yours'), 'link' => $this->getUrl('udsell/index/sellSearch')));
         }
         if (Mage::registry('current_category')) {
             $cat = Mage::registry('current_category');
             $pathIds = explode(',', $cat->getPathInStore());
             array_shift($pathIds);
             $cats = Mage::helper('udropship/catalog')->getCategoriesCollection($pathIds);
             foreach ($cats as $c) {
                 $breadcrumbsBlock->addCrumb('sellyours_cat' . $c->getId(), array('label' => $c->getName(), 'title' => $c->getName(), 'link' => $this->getUrl('udsell/index/' . $searchUrlKey, array('_current' => true, 'c' => $c->getId()))));
             }
             $breadcrumbsBlock->addCrumb('sellyours_cat' . $cat->getId(), array('label' => $cat->getName(), 'title' => $cat->getName(), 'link' => $this->getUrl('udsell/index/' . $searchUrlKey, array('_current' => true, 'c' => $cat->getId()))));
         }
         $breadcrumbsBlock->addCrumb('sellyours_query', array('label' => htmlspecialchars($product->getName()), 'title' => htmlspecialchars($product->getName()), 'link' => $this->getUrl('*/*/*', array('_current' => true))));
     }
     return Mage_Catalog_Block_Product_Abstract::_prepareLayout();
 }
开发者ID:xiaoguizhidao,项目名称:magento,代码行数:25,代码来源:ProductView.php

示例11: _prepareLayout

 /**
  * Placeholder function to add js/css to the top of the page.
  * Only works if it's an instance widget or inserted into the layout the normal way.
  * If it's a widget, you add {{widget type="dhcarousel/carousel"}} to a CMS page.
  */
 protected function _prepareLayout()
 {
     //Place your own stuffz.
     /*if ($head = $this->getLayout()->getBlock('head')) {
           $head->addCss('myfile.css');
           $head->addItem('skin_js','jquery/testjs.js');
       }*/
     return parent::_prepareLayout();
 }
开发者ID:AlexanderParker,项目名称:Doghouse_Carousel,代码行数:14,代码来源:Carousel.php

示例12: _prepareLayout

 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'custom.pager');
     $pager->setAvailableLimit($this->getPagingValues());
     $pager->setCollection(Mage::helper('dailydeal')->getTodayDeals());
     $this->setChild('pager', $pager);
     return $this;
 }
开发者ID:bigtailbear14,项目名称:rosstheme,代码行数:9,代码来源:Todaydeal.php

示例13: _prepareLayout

 public function _prepareLayout()
 {
     if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) {
         $breadcrumbs->addCrumb('home', array('label' => Mage::helper('edge_showcase')->__('Home'), 'title' => Mage::helper('edge_showcase')->__('Go to Home Page'), 'link' => Mage::getBaseUrl()));
         $breadcrumbs->addCrumb('showcase', array('label' => Mage::helper('edge_showcase')->__('Showcase'), 'title' => Mage::helper('edge_showcase')->__('View All Articles'), 'link' => '/showcase'));
         $breadcrumbs->addCrumb('date', array('label' => Mage::helper('edge_showcase')->__(date('F Y', strtotime($this->article->getDate()))), 'title' => Mage::helper('edge_showcase')->__(date('F Y', strtotime($this->article->getDate()))), 'link' => '/showcase/' . strtolower(date('Y/F', strtotime($this->article->getDate())))));
         $breadcrumbs->addCrumb('article', array('label' => Mage::helper('edge_showcase')->__($this->article->getTitle()), 'title' => Mage::helper('edge_showcase')->__($this->article->getTitle())));
     }
     return parent::_prepareLayout();
 }
开发者ID:outeredge,项目名称:edge-magento-module-showcase,代码行数:10,代码来源:View.php

示例14: _prepareLayout

 protected function _prepareLayout()
 {
     if ($this->_show) {
         $headBlock = $this->getLayout()->getBlock('head');
         if ($this->getConfig('animation') == 'vrtaccordion' || $this->getConfig('animation') == 'hrzaccordion') {
             $headBlock->addCss('joomlart/jmslideshow/css/jquery-ui/jquery-ui.css');
             if ($this->getConfig('animation') == 'hrzaccordion') {
                 $headBlock->addCss('joomlart/jmslideshow/css/jquery-ui/jquery.hrzAccordion.defaults.css');
             }
         }
     }
     return parent::_prepareLayout();
 }
开发者ID:xiaoguizhidao,项目名称:autotech_design,代码行数:13,代码来源:List.php

示例15: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $AvailableLimit = array();
     $exp = explode(',', str_replace(', ', ',', (string) @$this->configP['availablelimit']));
     foreach ($exp as $item) {
         $AvailableLimit[$item] = $item;
     }
     $pager = $this->getLayout()->createBlock('page/html_pager', 'custom.pager');
     $pager->setAvailableLimit($AvailableLimit);
     $pager->setCollection($this->getCollection());
     $this->setChild('pager', $pager);
     $this->getCollection()->load();
     return $this;
 }
开发者ID:roshu1980,项目名称:add-computers,代码行数:15,代码来源:Todaydeal.php


注:本文中的Mage_Catalog_Block_Product_Abstract::_prepareLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。