I have two unique layout pages created to display different front-end looks on each. What I would like to do is created a second header.phtml file to call a different header configuration than is set out in my standard header.phtml file.
Does the following sound like a feasible way to tackle the goal?:
First, I created a second header file and called it “headerhome.phtml” inside my “frontend/default/dec-decor/template/page/html” folder, then I set up a duplicate block in my page.xml file which mirrors the first header file code and renamed the parent block info as listed in the code below. I have managed to get the new header to be called and displayed in my second template on the frontend, but cant get the nested “block” elements inside second header file to display and I feel that I am missing some important logic to the way that blocks are referenced in the .xml files.
This is the block I have created in page.xml:
<block type="page/html_header" name="headerhome" as="headerhome" template="page/html/headerhome.phtml">
<!-- breadcrumbs here -->
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
<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"/>
A. I dont have a grasp on the full breakdown of the code referencing in the type=, name= and template= tags? I’m ok with the “as=” tag. That is how the templates are called in the layout file…
B. Is the “underscore” in the “type=” tag a folder separator?? If so, where does the underscore work / not work?
C. Why do some blocks need a template reference and some don’t? Again, I am not fully sure of the breakdown in logic here…
I have read through lots of pages, videos and posts, and any documentation which attempts to explain the breakdown of this “block” code logic seems very wishy washy… (just my opinion)
Because I have called the “headerhome.phtml” file (that’s the new header file I have created) directly from an explicit location through the “template=” tag, would I be correct in assuming this is why the nested “blocks” in page.xml aren’t being pulled in as well?… yes/no?
I have spent weeks with Magento getting a handle on it’s abstract customisation ability, and I gotta tell you it’s not your average bear! We’re getting there though
Thanks in advance for your input…