Reputation: 135
I need to understand this in Magento . In page.xml
, for the following block :
<block type="page/template_links" name="top.links" as="topLinks"/>
I need to app/design/package/theme/template/page/template/links.phtml
Then for the following block ::
<block type="page/html_welcome" name="welcome" as="welcome"/>
Why I need to lookup app/code/core/Mage/Page/Block/Html/Welcome.php
?
Upvotes: 0
Views: 156
Reputation: 1018
In both cases you need to look inside the block classes:
for block type="page/template_links"
the class is Mage_Page_Block_Template_Links
and can be found in the file app/code/core/Mage/Page/Block/Template/Links.php
If you look inside the class you'll see:
protected function _construct()
{
$this->setTemplate('page/template/links.phtml');
}
This points to the file app/design/package/theme/template/page/template/links.phtml
The class for the second block only sets the welcome message, and has no template.
Upvotes: 2
Reputation:
In magento we set the template in xml or set template in Action. In your xml, you set as a block file. so by calling block function inside the template you can access the function.In welcome.php you can set the value and get the value in template.
Upvotes: 0