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


PHP Mage_Core_Block_Template::_prepareLayout方法代码示例

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


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

示例1: _prepareLayout

 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->getLayout()->createBlock('catalog/breadcrumbs');
     $brand_id = Mage::app()->getRequest()->getParam('id');
     $branddetail = $this->helper('designer')->getBrandDetails($brand_id);
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         $genseo = 1;
         if ($genseo == 1) {
             $headBlock->setTitle($branddetail['designer_name'] . ' Products: Buy Online ' . $branddetail['designer_name'] . ' Products, Deals, Offers, Discounts - Zoffio');
             $mehyphen = "-";
             //$headBlock->setDescription("Zoffio presents a wide range of products by ".$branddetail['designer_name']." such as ".$mehyphen." Top Selling Products and more. Cash on delivery & free shipping available.");
             $headBlock->setDescription($branddetail['designer_name'] . ' Products: Buy Online ' . $branddetail['designer_name'] . ' Products at Wholesale Rate - Best deals and special offers on ' . $branddetail['designer_name'] . ' at Zoffio.com, an online shopping store.');
             $headBlock->setKeywords($branddetail['designer_name'] . ' Products, ' . $branddetail['designer_name'] . '  Products at Wholesale Rate, ' . $branddetail['designer_name'] . ' Product Deals, ' . $branddetail['designer_name'] . ' Product Offers, ' . $branddetail['designer_name'] . ' Product Discounts, Buy Online ' . $branddetail['designer_name'] . ' Products');
         } else {
             if ($branddetail['meta_title'] !== "") {
                 //$headBlock->setTitle($branddetail['meta_title']);
                 $headBlock->setTitle('Buy ' . $branddetail['designer_name'] . ' Products Online in India | Zoffio');
             }
             if ($branddetail['meta_descr'] !== "") {
                 //$headBlock->setDescription($branddetail['meta_descr']);
                 $headBlock->setDescription('Zoffio presents a wide range of products by ' . $branddetail['designer_name'] . ' such as – Top Selling Products and more. Cash on delivery & free shipping available.');
             }
             if ($branddetail['meta_tags'] != "") {
                 // $headBlock->setKeywords($branddetail['meta_tags']);
                 $headBlock->setKeywords('buy ' . $branddetail['designer_name'] . ' products online,' . $branddetail['designer_name'] . ' products India,order' . $branddetail['designer_name'] . ' products online,office supplies store india, zoffio');
             }
         }
     }
     return $this;
     //return parent::_prepareLayout();
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:32,代码来源:Brandview.php

示例2: delayedPrepareLayout

 public function delayedPrepareLayout()
 {
     $layer = $this->getLayer();
     if ($this->getShowRootCategory()) {
         $this->setCategoryId(Mage::app()->getStore()->getRootCategoryId());
     }
     if (Mage::registry('product')) {
         $categories = Mage::registry('product')->getCategoryCollection()->setPage(1, 1)->load();
         if ($categories->count()) {
             $this->setCategoryId(current($categories->getIterator()));
         }
     }
     $origCategory = null;
     if ($this->getCategoryId()) {
         $category = Mage::getModel('catalog/category')->load($this->getCategoryId());
         if ($category->getId()) {
             $origCategory = $layer->getCurrentCategory();
             $layer->setCurrentCategory($category);
         }
         $categoryId = $this->getCategoryId();
     } else {
         $categoryId = Mage::app()->getStore()->getRootCategoryId();
     }
     $this->_prepareProductCollection($layer->getProductCollection(), $categoryId);
     if ($origCategory) {
         $layer->setCurrentCategory($origCategory);
     }
     return parent::_prepareLayout();
 }
开发者ID:mSupply,项目名称:runnable_test_repo,代码行数:29,代码来源:ExcludeProductsNotAssignedToSubCategories.php

示例3: _prepareLayout

 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'history_pager')->setCollection($this->getCollection());
     $this->setChild('history_pager', $pager);
     return $this;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:7,代码来源:History.php

示例4: _prepareLayout

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

示例5: _prepareLayout

 protected function _prepareLayout()
 {
     if ($this->getIsEmail()) {
         $this->setTemplate('downloads/email_file_links.phtml');
     }
     $title = trim($this->getTitle());
     if (empty($title)) {
         $this->setTitle(Mage::helper('downloads')->getFileDownloadsTitle());
     }
     $id = $this->getId();
     if (empty($id) && $this->getIds()) {
         $id = implode(',', $this->getIds());
     }
     if (empty($id)) {
         return '';
     } else {
         $ids = explode(',', $id);
         $files = Mage::getResourceModel('downloads/files_collection');
         $files->addResetFilter()->addFilesFilter($ids)->addStatusFilter()->addCategoryStatusFilter()->addStoreFilter()->addSortOrder();
         $items = $files->getItems();
         foreach ($items as $k => $item) {
             if (!Mage::helper('downloads')->checkCustomerGroupAccess($item) && Mage::helper('downloads')->isHideFiles()) {
                 unset($items[$k]);
             }
         }
         if (Mage::helper('downloads')->getGroupByCategory()) {
             $items = $this->groupFiles($items);
         }
         $this->setItems($items);
     }
     return parent::_prepareLayout();
 }
开发者ID:commercekitchen,项目名称:dualeyewear-magento,代码行数:32,代码来源:Link.php

示例6: _prepareLayout

 protected function _prepareLayout()
 {
     $category = $this->getCurrentCategory();
     $route = Mage::helper('blog')->getRoute();
     $isBlogPage = Mage::app()->getFrontController()->getAction()->getRequest()->getModuleName() == 'blog';
     // show breadcrumbs
     if ($isBlogPage && Mage::getStoreConfig('blog/info/blogcrumbs') && ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs'))) {
         $breadcrumbs->addCrumb('home', array('label' => Mage::helper('blog')->__('Home'), 'title' => Mage::helper('blog')->__('Go to Home Page'), 'link' => Mage::getUrl('blog')));
         $breadcrumbs->addCrumb('blog', array('label' => Mage::getStoreConfig('blog/info/title'), 'title' => Mage::helper('blog')->__('Return to ' . Mage::getStoreConfig('blog/info/title')), 'link' => Mage::getUrl($route)));
         if ($category) {
             $catNames = array();
             while ($category->getId() != Mage::getStoreConfig('blog/info/root_category_id')) {
                 $catNames[] = $category;
                 $category = Mage::getModel('blog/category')->load($category->getParentId());
             }
             $catNames = array_reverse($catNames);
             $link = "";
             $i = 0;
             foreach ($catNames as $c) {
                 if ($i == count($catNames) - 1) {
                     $breadcrumbs->addCrumb('blog_cat_' . $c->getId(), array('label' => $c->getName(), 'title' => $c->getName()));
                 } else {
                     $breadcrumbs->addCrumb('blog_cat_' . $c->getId(), array('label' => $c->getName(), 'title' => $c->getName(), 'link' => Mage::getUrl('blog') . $link . $c->getUrlKey() . '.html'));
                 }
                 $link .= $c->getUrlKey() . '/';
                 $i++;
             }
         }
     }
     return parent::_prepareLayout();
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:31,代码来源:View.php

示例7: _prepareLayout

 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'referer_pager')->setTemplate('affiliateplus/html/pager.phtml')->setCollection($this->getCollection());
     $this->setChild('referer_pager', $pager);
     $grid = $this->getLayout()->createBlock('affiliateplus/grid', 'referer_grid');
     // prepare column
     //		$grid->addColumn('id',array(
     //			'header'	=> $this->__('No.'),
     //			'align'		=> 'left',
     //			'render'	=> 'getNoNumber',
     //		));
     $grid->addColumn('referer', array('header' => $this->__('Traffic Source'), 'align' => 'left', 'render' => 'getReferer', 'searchable' => true));
     $url = Mage::getUrl('*/*/*');
     if ($this->getRequest()->getParam('click') == 'desc') {
         $header = '<a href="' . $url . 'click/asc" class="sort-arrow-desc" title="' . $this->__('ASC') . '">' . $this->__('Clicks') . '</a>';
     } else {
         $header = '<a href="' . $url . 'click/desc" class="sort-arrow-asc" title="' . $this->__('DESC') . '">' . $this->__('Clicks') . '</a>';
     }
     $grid->addColumn('total_clicks', array('header' => $header, 'index' => 'total_clicks', 'align' => 'left'));
     if ($this->getRequest()->getParam('unique') == 'desc') {
         $header = '<a href="' . $url . 'unique/asc" class="sort-arrow-desc" title="' . $this->__('ASC') . '">' . $this->__('Unique Clicks') . '</a>';
     } else {
         $header = '<a href="' . $url . 'unique/desc" class="sort-arrow-asc" title="' . $this->__('DESC') . '">' . $this->__('Unique Clicks') . '</a>';
     }
     $grid->addColumn('unique_clicks', array('header' => $header, 'index' => 'unique_clicks', 'align' => 'left'));
     if ($this->_getHelper()->getSharingConfig('balance') != 'store') {
         $grid->addColumn('store_id', array('header' => $this->__('Store View'), 'index' => 'store_id', 'type' => 'options', 'options' => $this->getStoresOption(), 'searchable' => true));
     }
     $grid->addColumn('landing_page', array('header' => $this->__('Landing Page'), 'render' => 'getUrlPath', 'searchable' => true, 'index' => 'landing_page'));
     Mage::dispatchEvent('affiliateplus_prepare_referers_columns', array('grid' => $grid));
     $this->setChild('referer_grid', $grid);
     return $this;
 }
开发者ID:bigtailbear14,项目名称:rosstheme,代码行数:34,代码来源:Magestore_Affiliateplus_Block_Referrer.php

示例8: _prepareLayout

 protected function _prepareLayout()
 {
     $title = trim($this->getTitle());
     if (empty($title)) {
         $this->setTitle('');
     }
     $id = $this->getId();
     if (empty($id)) {
         return '';
     } else {
         $files = Mage::getResourceModel('downloads/files_collection');
         $files->addResetFilter()->addStatusFilter()->addCategoryStatusFilter()->addStoreFilter();
         $sort = '';
         if ($id == 'all') {
             $this->setIsAllCategories(true);
         } else {
             $ids = explode(',', $id);
             $files->addCategoryFilter($ids);
             $this->setIsAllCategories(false);
         }
         $items = $files->getItems();
         foreach ($items as $k => $item) {
             if (!Mage::helper('downloads')->checkCustomerGroupAccess($item) && Mage::helper('downloads')->isHideFiles()) {
                 unset($items[$k]);
             }
         }
         if (Mage::helper('downloads')->getGroupByCategory()) {
             $items = $this->groupFiles($items);
         }
         $this->setItems($items);
     }
     return parent::_prepareLayout();
 }
开发者ID:commercekitchen,项目名称:dualeyewear-magento,代码行数:33,代码来源:Link.php

示例9: _prepareLayout

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

示例10: _prepareLayout

 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'customer_affiliate_history')->setCollection($this->getAffiliateHistory());
     $this->setChild('pager', $pager);
     return $this;
 }
开发者ID:Gilbertoavitia1,项目名称:AHBS,代码行数:7,代码来源:History.php

示例11: _prepareLayout

 protected function _prepareLayout()
 {
     if (Mage::registry('subdomain')) {
         parent::_prepareLayout();
         return;
     }
     $left = $this->getLayout()->getBlock('left');
     if ($left && Mage::helper('gomage_navigation')->isGomageNavigation() && Mage::getStoreConfig('gomage_navigation/category/active')) {
         $left->unsetChild('gomage.navigation.left');
         $page = Mage::getSingleton('cms/page');
         if ($page->getData('page_id')) {
             if ($page->getData('navigation_left_column')) {
                 $navigation_left = $this->getLayout()->createBlock('gomage_navigation/navigation', 'gomage.navigation.left')->setTemplate('gomage/navigation/catalog/navigation/left.phtml');
                 $navigation_left->SetNavigationPlace(GoMage_Navigation_Block_Navigation::LEFT_COLUMN);
                 $left->insert($navigation_left);
             }
         } else {
             if (!Mage::getStoreConfig('gomage_navigation/category/show_shopby')) {
                 $navigation_left = $this->getLayout()->createBlock('gomage_navigation/navigation', 'gomage.navigation.left')->setTemplate('gomage/navigation/catalog/navigation/left.phtml');
                 $navigation_left->SetNavigationPlace(GoMage_Navigation_Block_Navigation::LEFT_COLUMN);
                 $left->insert($navigation_left);
             }
         }
     }
     parent::_prepareLayout();
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:26,代码来源:Left.php

示例12: _prepareLayout

 protected function _prepareLayout()
 {
     if (!$this->getLayout()->getBlock('head') == null) {
         $this->getLayout()->getBlock('head')->setTitle(Mage::helper('marketplace')->__('Seller Dashboard'));
     }
     return parent::_prepareLayout();
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:7,代码来源:Marketplace.php

示例13: _prepareLayout

 /**
  * prepare block's layout
  *
  * @return Magestore_Bannerslider_Block_Bannerslider
  */
 public function _prepareLayout()
 {
     //            die('sdfsfsdsdfs');
     //
     parent::_prepareLayout();
     // $this->setTemplate('bannerslider/standardslider.phtml');
 }
开发者ID:pakraprom,项目名称:TestGitHub,代码行数:12,代码来源:Preview.php

示例14: _prepareLayout

 public function _prepareLayout()
 {
     $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
     $breadcrumbs->addCrumb('home', array('label' => Mage::helper('cms')->__('Home'), 'title' => Mage::helper('cms')->__('Home Page'), 'link' => Mage::getBaseUrl()));
     $breadcrumbs->addCrumb('faq', array('label' => 'FAQ', 'title' => 'FAQ', 'link' => Mage::getUrl("faq")));
     return parent::_prepareLayout();
 }
开发者ID:Thinlt,项目名称:simicart,代码行数:7,代码来源:Overview.php

示例15: _prepareLayout

 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $pager = $this->getLayout()->createBlock('page/html_pager', 'tiers_pager')->setCollection($this->getCollection());
     $this->setChild('tiers_pager', $pager);
     $grid = $this->getLayout()->createBlock('affiliateplus/grid', 'tiers_grid');
     $url = $this->getUrl('affiliatepluslevel/index/listTier/');
     // prepare column
     $grid->addColumn('id', array('header' => $this->__('No.'), 'align' => 'left', 'render' => 'getNoNumber'));
     if ($this->getRequest()->getParam('joined') == 'desc') {
         $header = '<a href="' . $url . 'joined/asc" class="sort-arrow-desc" title="' . $this->__('ASC') . '">' . $this->__('Joined time') . '</a>';
     } else {
         $header = '<a href="' . $url . 'joined/desc" class="sort-arrow-asc" title="' . $this->__('DESC') . '">' . $this->__('Joined time') . '</a>';
     }
     $grid->addColumn('created_time', array('header' => $header, 'index' => 'created_time', 'type' => 'date', 'format' => 'medium', 'align' => 'left'));
     $grid->addColumn('name', array('header' => $this->__('Affiliates'), 'index' => 'name', 'align' => 'left', 'render' => 'getAffiliatesName'));
     if ($this->getRequest()->getParam('level') == 'desc') {
         $header = '<a href="' . $url . 'level/asc" class="sort-arrow-desc" title="' . $this->__('ASC') . '">' . $this->__('Level') . '</a>';
     } else {
         $header = '<a href="' . $url . 'level/desc" class="sort-arrow-asc" title="' . $this->__('DESC') . '">' . $this->__('Level') . '</a>';
     }
     $grid->addColumn('level', array('header' => $header, 'index' => 'level', 'align' => 'left', 'render' => 'getLevel'));
     $grid->addColumn('sum', array('header' => $this->__('Commissions'), 'align' => 'left', 'index' => 'sum', 'render' => 'getSum'));
     $grid->addColumn('status', array('header' => $this->__('Status'), 'align' => 'left', 'index' => 'status', 'type' => 'options', 'options' => array(1 => $this->__('Enabled'), 2 => $this->__('Disabled'))));
     $this->setChild('tiers_grid', $grid);
     return $this;
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:27,代码来源:Tiers.php


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