Try the Demo

Magento Forum

   
Why are all initLayout.xml parsed? 
 
Tweakmag
Guru
 
Avatar
Total Posts:  306
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

 Signature 

adam martin: internet consultant / web developer
contact | adam.martin@tweakmag.com
http://www.tweakmag.com - Must have developer extension available soon - please make contact if interested in testing!
Mage Stats - http://www.magestats.com - Magento, Google Analytics and Realtime Stats combined - true customer insight.

 
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

 Signature 

- I would love to change the world, but they won’t give me the source code -

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