1

I'm trying to understand how Magento renders the custom layout xml that you can add to CMS pages or categories via the design tab. It seems to be applied after the theme's local.xml, but I can't find it.

I see loadLayoutUpdates in Mage/Core/Controller/Varien/Action.php at line 294-ish, but nothing there looks like it's getting anything from the database. (Custom layout updates are stored in the database, no?)

(To be clear, I'm not asking how to enter custom layout xml in the admin. Just wondering what's going on under the hood.)

3

For cms pages the layout is applied in Mage_Cms_Helper_Page::_renderPage().

For categories it happens in the view action of the Category controller
In both cases, the xml from the db is merged into the xml from the layout handles

1
  • Aha! Thank you! I missed it because I started off looking at the wrong controller. – Yumecosmos Dec 17 '15 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.