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.
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.)