Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Layout Update in CMS
 
danshields
Member
 
Total Posts:  32
Joined:  2009-03-11
 

Ok I am able to get layout updates to work fine in the CMS Custom Design section but I am having difficult getting one to work. I have a custom header.phtml file I created and use through out the site but in the CMS I want it to be different so I created a second one and wanted to do the layout update in the CMS.

It doesn’t seem to like it it whatever I do. I try this

<reference name="header">
            <
block type="core/template" name="cms.header"  as="header"  template="cms/header_about.phtml"/>
        </
reference>
I have tried it withough the as, with a different type and nothing works it just shows the other header. Its weird because if I put

<remove name="header" />

It is removing the existing one. Sometimes I just don’t get what I am suppose to put in the layout update. I didn’t think I would have to put the as because that is in the page.xml and figured thats the only place it needed to be. in Page.xml the type is page/header but that didn’t work for me either.

 
Magento Community Magento Community
Magento Community
Magento Community
 
danshields
Member
 
Total Posts:  32
Joined:  2009-03-11
 

I was able to figure it out. I made it work by adding it through an action by setting the template. If anyone can tell me why I had to do this instead of the block please go ahead. I understand this seems to be better anyways.

<reference name="header">
 <
action method="setTemplate"><template>page/html/header_about.phtml</template></action>
</
reference>
 
Magento Community Magento Community
Magento Community
Magento Community
 
adsjflkj89j
Member
 
Total Posts:  52
Joined:  2009-03-19
 

If I understand correctly the phtml files call the xml files for layout.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top