Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 protected function _prepareLayout()
 {
     $title = $this->getHeaderText();
     $this->getLayout()->getBlock('head')->setTitle($title);
     $this->getLayout()->getBlock('root')->setHeaderTitle($title);
     return parent::_prepareLayout();
 }
Ejemplo n.º 3
0
 /**
  * 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();
 }
Ejemplo n.º 4
0
 /**
  * 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();
 }
Ejemplo n.º 5
0
 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;
 }
Ejemplo n.º 6
0
 /**
  * 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();
 }
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->setTemplate("affiliatepluswidget/products.phtml");
     $this->_prepareWidgetData();
     return $this;
 }
 /**
  * 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();
 }
Ejemplo n.º 9
0
 /**
  * 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();
 }
Ejemplo n.º 10
0
 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();
 }
Ejemplo n.º 11
0
 /**
  * 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();
 }
Ejemplo n.º 12
0
 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;
 }
Ejemplo n.º 13
0
 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();
 }
Ejemplo n.º 14
0
 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();
 }
Ejemplo n.º 15
0
 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;
 }
Ejemplo n.º 16
0
 /**
  * Prepare global layout
  *
  * @return Zeon_Artist_Block_View
  */
 protected function _prepareLayout()
 {
     $artist = $this->getArtist();
     $helper = Mage::helper('zeon_artist');
     // show breadcrumbs
     if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) {
         $breadcrumbs->addCrumb('home', array('label' => $helper->__('Home'), 'title' => $helper->__('Go to Home Page'), 'link' => Mage::getBaseUrl()));
         $breadcrumbs->addCrumb('artist_list', array('label' => $helper->__('Artist'), 'title' => $helper->__('Artist'), 'link' => Mage::getUrl('artist')));
         $breadcrumbs->addCrumb('artist_view', array('label' => Mage::getModel('zeon_artist/artist')->getArtistName($artist->getArtist(), Mage::app()->getStore()->getId()), 'title' => $artist->getIdentifier()));
     }
     $head = $this->getLayout()->getBlock('head');
     if ($head) {
         $head->setTitle($helper->getDefaultTitle());
         $head->setKeywords($helper->getDefaultMetaKeywords());
         $head->setDescription($helper->getDefaultMetaDescription());
     }
     return parent::_prepareLayout();
 }
Ejemplo n.º 17
0
 protected function _prepareLayout()
 {
     $this->getLayout()->createBlock('catalog/breadcrumbs');
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         if ($title = $this->getProduct()->getMetaTitle()) {
             $headBlock->setTitle($title . ' ' . Mage::getStoreConfig('catalog/seo/title_separator') . ' ' . Mage::getStoreConfig('system/store/name'));
         }
         if ($keyword = $this->getProduct()->getMetaKeyword()) {
             $headBlock->setKeywords($keyword);
         } elseif ($currentCategory = Mage::registry('current_category')) {
             $headBlock->setKeywords($this->getProduct()->getName());
         }
         if ($description = $this->getProduct()->getMetaDescription()) {
             $headBlock->setDescription($description);
         } else {
             $headBlock->setDescription($this->getProduct()->getDescription());
         }
     }
     return parent::_prepareLayout();
 }
Ejemplo n.º 18
0
 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() != '') {
         $shop_title = $partner->getShoptitle();
     } else {
         $shop_title = $partner->getProfileurl();
     }
     $this->getLayout()->getBlock('head')->setTitle(Mage::helper('marketplace')->__("%s's Collection", $shop_title));
     $this->getLayout()->getBlock('head')->setKeywords($partner->getMetaKeyword());
     $this->getLayout()->getBlock('head')->setDescription($partner->getMetaDescription());
     $helper = Mage::helper('marketplace');
     if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) {
         $breadcrumbs->addCrumb('home', array('label' => $helper->__('Home'), 'title' => $helper->__('Go to Home Page'), 'link' => Mage::getBaseUrl()));
         $title = array();
         $path = $this->getBreadcrumbPath();
         foreach ($path as $name => $breadcrumb) {
             $breadcrumbs->addCrumb($name, $breadcrumb);
             $title[] = $breadcrumb['label'];
         }
     }
     return $this;
 }
Ejemplo n.º 19
0
 public function _prepareLayout()
 {
     return parent::_prepareLayout();
 }
Ejemplo n.º 20
0
 /**
  * Preparing block layout
  *
  * @return Mage_Tag_Block_Customer_View
  */
 protected function _prepareLayout()
 {
     $toolbar = $this->getLayout()->createBlock('Mage_Page_Block_Html_Pager', 'customer_tag_list.toolbar')->setCollection($this->_getCollection());
     $this->setChild('toolbar', $toolbar);
     return parent::_prepareLayout();
 }
Ejemplo n.º 21
0
 public function _prepareLayout()
 {
     $this->setTemplate('mst_searchautocomplete/autocomplete/result.phtml');
     return parent::_prepareLayout();
 }
Ejemplo n.º 22
0
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
 }
Ejemplo n.º 23
0
 /**
  * Need use as _prepareLayout - but problem in declaring collection from
  * another block (was problem with search result)
  */
 protected function _beforeToHtml()
 {
     $toolbar = $this->getLayout()->createBlock('catalog/product_list_toolbar', time());
     if ($orders = $this->getAvailableOrders()) {
         $toolbar->setAvailableOrders($orders);
     }
     if ($modes = $this->getModes()) {
         $toolbar->setModes($modes);
     }
     $toolbar->setCollection($this->_getProductCollection());
     $this->setChild('toolbar', $toolbar);
     $this->_getProductCollection()->load();
     Mage::getModel('review/review')->appendSummary($this->_getProductCollection());
     return parent::_prepareLayout();
 }