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

Why are all initLayout.xml parsed? 
 
Tweakmag
Guru
 
Avatar
Total Posts:  307
Joined:  2007-08-31
London, UK
 

Why is it that all initLayout.xml files are parsed no matter where I am in the site?
For example - to turnoff the left_col_callout I need to edit it in ‘layout/catalog/initLayout.xml’ but I could just as easy activate it by adding…

<reference name="left">
        <
block type="core/template" name="left.permanent.callout">
            <
action method="setTemplate"><template>callouts/left_col.phtml</template></action>
        </
block>
    </
reference>

to the newsletter/initLayout.xml (or any other initLayout.xml for that matter).

I assumed that they would only be called if needed.
Some clarification on this would be great.

Cheers
Adam

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

initLayout.xml files are setup to be a way for other modules to update default layout.

So they will run every time after core/default.xml

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