Reputation: 1323
There are several layout files in the layout directory of which page.xml gets processed first and local.xml gets processed last. However, it is unclear to me how to determine which of the other xml files in that directory are used in generating the Package Layout XML object. Presumably, for different frontName + controller name + action name a different subcollection of these files is bunched together. Furthermore the order in which these are bunched together may affect blocks like Mage_Core_Block_Text_List which just displays the blocks as they are added.
So, how can I determine whether a specific page request will bunch up a given foo.xml layout file in generating the Package Layout XML object from which the eventual Page Layout XML is derived?
Thanks.
Upvotes: 0
Views: 97
Reputation: 166066
While there's numerous files involved, (since module developers add a layout file to the configuration, the configuration is loaded and merged, and then the layout update object reads from the merged configuration to determine which files to load), you're probably looking for this
#File: app/code/core/Mage/Core/Model/Layout/Update.php
public function getFileLayoutUpdatesXml($area, $package, $theme, $storeId = null)
{
//...
$fileStr = file_get_contents($filename);
$fileStr = str_replace($this->_subst['from'], $this->_subst['to'], $fileStr);
$fileXml = simplexml_load_string($fileStr, $elementClass);
//...
}
Log or var_dump the $filename
variable and you'll be able to see which files Magento is trying to load.
Upvotes: 1