Last active
January 1, 2016 06:39
-
-
Save xcommerce-gists/8106110 to your computer and use it in GitHub Desktop.
Magento simple Hello World extension: Template helpers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Magento simple Hello World extension: Template helpers | |
* | |
* Helper classes for the template | |
* provided for documentation purposes in the | |
* Magento 1.x Extension Developer's Guide | |
* | |
* @copyright Copyright (c) 2014 eBay Inc. (http://www.magentocommerce.com) | |
*/ | |
<?php | |
class Tutorials_Hello_Block_Hello extends Mage_Core_Block_Template { | |
public function _prepareLayout() | |
{ | |
$this->getLayout()->getBlock('breadcrumbs') | |
->addCrumb('home', | |
array('label'=>Mage::helper('catalogsearch')->__('Home'), | |
'title'=>Mage::helper('catalogsearch')->__('Go to Home Page'), | |
'link'=>Mage::getBaseUrl()) | |
) | |
->addCrumb('customer', | |
array('label'=>Mage::helper('customer')->__('Hello')) | |
); | |
return parent::_prepareLayout(); | |
} | |
public function getHello() | |
{ | |
echo $this->__('Hello World'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment