I think I am confused because after going so further in learning magento, I am getting this basic doubt now.
The problem is that I created a new block in layout of my created theme folder. The thing which I can't understand is what should be the value of the "type" attribute of block layout element?
I know that "type" attribute refers to the php classes but what I can't understand is that which php class name should I assign as "type" attribute to the block layout element?
The block is as shown below with the "type" --> page/html_header
. (I don't know why it is rendering fine with this "type" attribute value)
<block type="page/html_header" name="happy.label" as="happyLabel" template="page/html/happyLabel.phtml"/>
Here is the relevant xml layout code from design/frontend/default/{$mytheme}/layout/page.xml
:
<default translate="label" module="page">
<label>All Pages</label>
<block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
<!--------------->
<block type="page/html_header" name="header" as="header">
<block type="page/html_header" name="happy.label" as="happyLabel" template="page/html/happyLabel.phtml"/>
<block type="page/template_links" name="top.links" as="topLinks"/>
<block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
<block type="core/text_list" name="top.menu" as="topMenu" translate="label">
<label>Navigation Bar</label>
<block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
</block>
<block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
<label>Page Header</label>
<action method="setElementClass"><value>top-container</value></action>
</block>
<block type="page/html_welcome" name="welcome" as="welcome"/>
</block>
<!--------------->
</block>
</default>
The template file just has five list items in UL and Li format.
EDIT:
- How should I choose which value to pass to "type" attribute when creating a block?