本文整理汇总了PHP中Mage_Catalog_Block_Product_List::_prepareLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Catalog_Block_Product_List::_prepareLayout方法的具体用法?PHP Mage_Catalog_Block_Product_List::_prepareLayout怎么用?PHP Mage_Catalog_Block_Product_List::_prepareLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Catalog_Block_Product_List
的用法示例。
在下文中一共展示了Mage_Catalog_Block_Product_List::_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();
}
示例2: _prepareLayout
protected function _prepareLayout()
{
$title = $this->__("All Brands");
$module = $this->getRequest()->getModuleName();
$filter_group = $this->getRequest()->getParam('category');
$route = $this->getGeneralConfig("route");
if (!$route) {
$route = $module;
}
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
$breadcrumbs->addCrumb('home', array('label' => Mage::helper('ves_brand')->__('Home'), 'title' => Mage::helper('ves_brand')->__('Go to Home Page'), 'link' => Mage::getBaseUrl()));
$breadcrumbs->addCrumb('venus_brand', array('label' => $title, 'title' => $title, 'link' => Mage::getBaseUrl() . $route));
//set title by list all brand
$this->setTitleBrand($title);
//set by group
if (isset($filter_group)) {
//set tile by group
$this->setTitleBrand($this->getGroup($filter_group)['name']);
$breadcrumbs->addCrumb('venus_group', array('label' => $this->getGroup($filter_group)['name'], 'title' => Mage::helper('ves_brand')->__($this->getGroup($filter_group)['name']), 'link' => Mage::getBaseUrl() . $route . '/' . $this->getGroup($filter_group)['identifier'] . '.html'));
$this->getLayout()->getBlock('head')->setTitle($title . "-" . $this->getGroup($filter_group)['name']);
} else {
$this->getLayout()->getBlock('head')->setTitle($title);
}
$this->getCountingPost();
return parent::_prepareLayout();
}
示例3: _prepareLayout
public function _prepareLayout()
{
parent::_prepareLayout();
/*$pager = $this->getLayout()->createBlock('page/html_pager', 'custom.pager');
//$pager->setAvailableLimit(array(5=>5,10=>10,20=>20,'all'=>'all'));
$pager->setCollection($this->getCollection());
$this->setChild('pager', $pager);
$this->getCollection()->load();*/
$name = 'gosf_cookie2013';
if (Mage::getModel('core/cookie')->get($name) != 'gosf') {
header('Location:http://www.zoffio.com/');
exit;
}
$param = $this->getRequest()->getParam('id');
if ($headBlock = $this->getLayout()->getBlock('head')) {
if ($param == 20) {
$headBlock->setTitle("Stationery");
$headBlock->setDescription($gosfcategory['meta_descr']);
$headBlock->setKeywords($gosfcategory['meta_tags']);
}
if ($param == 72) {
$headBlock->setTitle("Tech & Digitals");
$headBlock->setDescription($gosfcategory['meta_descr']);
$headBlock->setKeywords($gosfcategory['meta_tags']);
}
if ($param == 126) {
$headBlock->setTitle("Gift Items");
$headBlock->setDescription($gosfcategory['meta_descr']);
$headBlock->setKeywords($gosfcategory['meta_tags']);
}
}
return $this;
//return parent::_prepareLayout();
}
示例4: _prepareLayout
/**
* @return $this
*/
protected function _prepareLayout()
{
parent::_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('brandname', array('label' => $this->_brandname, 'title' => $this->_brandname));
return $this;
}
示例5: _prepareLayout
protected function _prepareLayout()
{
$title = $this->getConfig("brandnav_title");
if (!$title) {
$title = $this->__("All Brands");
}
$this->getLayout()->getBlock('head')->setTitle($title);
return parent::_prepareLayout();
}
示例6: _prepareLayout
protected function _prepareLayout()
{
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
$title = $this->getConfig("page_title", "deals_setting");
if ($breadcrumbs) {
$title = $this->getConfig("page_title", "deals_setting");
$breadcrumbs->addCrumb('home', array('label' => $this->__('Home'), 'title' => $this->__('Go to Home Page'), 'link' => Mage::getBaseUrl()))->addCrumb('deals', array('label' => $this->__("Deals"), 'title' => $this->__("Deals"), 'link' => Mage::helper("ves_deals")->getFilterUrl(0)))->addCrumb('item', array('label' => $title, 'title' => $title));
}
$this->getLayout()->getBlock('head')->setTitle($title);
return parent::_prepareLayout();
}
示例7: _prepareLayout
protected function _prepareLayout()
{
$b_title = $this->__($this->getAttribute() . ": " . $this->getLabel());
$p_title = $this->__($this->getLabel() . " - " . $this->getAttribute() . " products");
// add Home breadcrumb
if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) {
$breadcrumbs->addCrumb('home', array('label' => $this->__('Home'), 'title' => $this->__('To homepage'), 'link' => Mage::getBaseUrl()))->addCrumb('filter', array('label' => $b_title, 'title' => $b_title));
}
$this->getLayout()->getBlock('head')->setTitle($p_title);
return parent::_prepareLayout();
}
示例8: _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()));
$breadcrumbsBlock->addCrumb('deals', array('label' => Mage::helper('multipledeals')->__('Active Deals'), 'title' => Mage::helper('multipledeals')->__('Active Deals')));
if ($headBlock = $this->getLayout()->getBlock('head')) {
$headBlock->setTitle(Mage::helper('multipledeals')->__('Active Deals'));
}
}
return parent::_prepareLayout();
}
示例9: _prepareLayout
public function _prepareLayout()
{
// add Home breadcrumb
if (Mage::app()->getFrontController()->getRequest()->getRouteName() === 'solrsearch') {
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
if ($breadcrumbs) {
$title = $this->__("Search results for: '%s'", $this->helper('catalogsearch')->getQueryText());
$breadcrumbs->addCrumb('home', array('label' => $this->__('Home'), 'title' => $this->__('Go to Home Page'), 'link' => Mage::getBaseUrl()))->addCrumb('search', array('label' => $title, 'title' => $title));
}
// modify page title
$title = $this->__("Search results for: '%s'", $this->helper('solrsearch')->getEscapedQueryText());
$this->getLayout()->getBlock('head')->setTitle($title);
} else {
$this->getLayout()->createBlock('catalog/breadcrumbs');
}
return parent::_prepareLayout();
}
示例10: _prepareLayout
public function _prepareLayout()
{
parent::_prepareLayout();
$brand_id = $this->getValueId();
$branddetail = $this->helper('designer')->getBrandDetails($brand_id);
if ($headBlock = $this->getLayout()->getBlock('head')) {
if ($branddetail['meta_title'] !== "") {
$headBlock->setTitle($branddetail['meta_title']);
}
if ($branddetail['meta_descr'] !== "") {
$headBlock->setDescription($branddetail['meta_descr']);
}
if ($branddetail['meta_tags'] != "") {
$headBlock->setKeywords($branddetail['meta_tags']);
}
}
return $this;
//return parent::_prepareLayout();
}
示例11: _prepareLayout
protected function _prepareLayout()
{
parent::_prepareLayout();
// $perPage = str_replace(' ', '', $this->getConfig('grid_per_page_values'));
// $arr = explode(',', $perPage);
// $arrPerPage = array();
// foreach ($arr as $page) {
// $arrPerPage[$page] = $page;
// }
// if ($this->getConfig('all')) {
// $arrPerPage['all'] = $this->__('All');
// }
//
// $pager = $this->getLayout()->createBlock('page/html_pager', 'custom.pager');
// $pager->setAvailableLimit($arrPerPage);
// $pager->setCollection($this->getCollection());
// $this->setChild('pager', $pager);
// $this->getCollection()->load();
// return $this;
}
示例12: _prepareLayout
/**
* Set the Giveaway Product Collection then call the parent function
*
* (non-PHPdoc)
* @see Mage_Core_Block_Abstract::_prepareLayout()
*/
public function _prepareLayout()
{
$this->_getGiveawayCollection();
// add Home breadcrumb
$oBreadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
// if we don't have breadcrumbs in layout, just continue
if (!$oBreadcrumbs) {
return parent::_prepareLayout();
}
$sTitle = $this->__('Free Allowances');
if ($oBreadcrumbs) {
$oBreadcrumbs->addCrumb('home', array('label' => $this->__('Home'), 'title' => $this->__('Go to Home Page'), 'link' => Mage::getBaseUrl()))->addCrumb('giveaway', array('label' => $sTitle, 'title' => $sTitle));
}
// modify page title
$oHeadBlock = $this->getLayout()->getBlock('head');
if ($oHeadBlock) {
$oHeadBlock->setTitle($sTitle);
}
$oTitleBlock = $this->getLayout()->createBlock('sitewards_giveaway/product_listTitle')->setTemplate('sitewards/giveaway/catalog/product/list_title.phtml');
$this->getLayout()->getBlock('content')->insert($oTitleBlock);
return parent::_prepareLayout();
}
示例13: _prepareLayout
protected function _prepareLayout()
{
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
if ($breadcrumbs) {
$title = $this->getBrand()->getTitle();
$breadcrumbs->addCrumb('home', array('label' => $this->__('Home'), 'title' => $this->__('Go to Home Page'), 'link' => Mage::getBaseUrl()))->addCrumb('brands', array('label' => $this->__("Brand"), 'title' => $this->__("Brand"), 'link' => Mage::getUrl($this->getGeneralConfig("route"))))->addCrumb('item', array('label' => $title, 'title' => $title));
}
if ($this->getBrand()->getPagetitle()) {
$title = $this->getBrand()->getPagetitle();
} else {
$title = $this->__("Brand - %s", $this->getBrand()->getTitle());
}
$this->getLayout()->getBlock('head')->setTitle($title);
if ($this->getBrand()->getMetaKeywords()) {
$keywords = $this->getBrand()->getMetaKeywords();
$this->getLayout()->getBlock('head')->setKeywords($keywords);
}
if ($this->getBrand()->getMetaDescription()) {
$description = $this->getBrand()->getMetaDescription();
$this->getLayout()->getBlock('head')->setDescription($description);
}
return parent::_prepareLayout();
}
示例14: _prepareLayout
protected function _prepareLayout()
{
$rule = $this->getRule();
$title = '';
if ($rule->getPageTitle() != '') {
$title = $rule->getPageTitle();
} elseif ($rule->getTitle()) {
$title = $rule->getTitle();
}
$this->getLayout()->getBlock('head')->setTitle($title);
if ($rule->getMetaKeywords()) {
$keywords = $rule->getMetaKeywords();
$this->getLayout()->getBlock('head')->setKeywords($keywords);
}
if ($rule->getMetaDescription()) {
$description = $rule->getMetaDescription();
$this->getLayout()->getBlock('head')->setDescription($description);
}
return parent::_prepareLayout();
}
示例15: _prepareLayout
public function _prepareLayout()
{
return parent::_prepareLayout();
}