You are correct, and this is a valid & used approach for sites with multiple themes. There are a couple of additional (little-known, seldom-used) options which can be used for layout updates which apply to different store scopes: the store handle and the theme handle.
From the action controller superclass Mage_Core_Controller_Varien_Action
(link):
public function addActionLayoutHandles()
{
$update = $this->getLayout()->getUpdate();
// load store handle
$update->addHandle('STORE_'.Mage::app()->getStore()->getCode());
// load theme handle
$package = Mage::getSingleton('core/design_package');
$update->addHandle(
'THEME_'.$package->getArea().'_'.$package->getPackageName().'_'.$package->getTheme('layout')
);
// load action handle
$update->addHandle(strtolower($this->getFullActionName()));
return $this;
}
For a store with the code 'deutsch' and a theme configuration of 'default' package, 'german' theme, the following handles would apply to almost every view, as most views use them:
<STORE_deutsch>
<THEME_frontend_default_german>
By implementation these handles can be utilized in much the same way as <default />
.
So I now think I understand what is going on here, maybe.
In previous versions of enterprise the layout.xml files in the enterprise theme were simply copies of the base theme's files with the extra enterprise features added. So they have simply taken the base files and added a few lines to them and then included them all in the enterprise theme. This includes layout files with no changes from the base theme.
Now with the addition of theme fallback in version 1.14 the layout files in the enterprise rwd theme are simply the extra enterprise parts. Think of it as how you would change a theme via a local.xml or a module's layout file. This means that only the changes are in the layout files and not the complete copy with a few extra line.
This seems a massive benefit as you only have the changes you make for enterprise and not a complete copy.
For example in the catalog search for enterprise you have suggestions and recommendation blocks. In none rwd theme there is a complete enterprise/catalogsearch.xml
file that is the same as the normal catalogsearch.xml
file but with the two new blocks.
<catalogsearch_result_index translate="label">
<label>Quick Search Form</label>
<reference name="root">
<action method="setTemplate"><template>page/3columns.phtml</template></action>
</reference>
<reference name="left">
<block type="catalogsearch/layer" name="catalogsearch.leftnav" before="-" template="catalog/layer/view.phtml"/>
</reference>
<reference name="content">
<block type="catalogsearch/result" name="search.result" template="catalogsearch/result.phtml">
<block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<block type="core/text_list" name="additional" translate="label">
<label>Additional Info</label>
<block type='enterprise_search/suggestions' name='search_suggestions' template="search/suggestions.phtml"></block>
<block type='enterprise_search/recommendations' name='search_recommendations' template="search/recommendations.phtml"></block>
</block>
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
<action method="setPageLayout"><layout>three_columns</layout></action>
</block>
<action method="setListOrders"/>
<action method="setListModes"/>
<action method="setListCollection"/>
</block>
</reference>
</catalogsearch_result_index>
Now the rwd enterprise/catalogsearch.xml
file looks like a "normal" theme local.xml file and is simply the two new blocks being added to the handle by reference.
<layout version="0.1.0">
<catalogsearch_result_index translate="label">
<reference name="search_result_list">
<block type="core/text_list" name="additional" translate="label">
<label>Additional Info</label>
<block type='enterprise_search/suggestions' name='search_suggestions' template="search/suggestions.phtml"></block>
<block type='enterprise_search/recommendations' name='search_recommendations' template="search/recommendations.phtml"></block>
</block>
</reference>
</catalogsearch_result_index>
</layout>
On a further note from @ErikHansen
You may also notice that with CE 1.9/EE 1.14, there were a number of
core/text_list blocks that were added to the
app/design/frontend/rwd/default/layout files to allow the Enterprise
layout files to add functionality with overriding the entire layout
files
Best Answer
My understanding is that yes, only one local.xml will be read. But that doesn't mean that your child theme can't make changes. My suggestion is to carefully read this great article by Alan Storm on theme inheritance. While it's not totally required that you install the module that is mentioned in the article, I've used it to great effect to have a child of a child of a child theme in a large Magento site.