I want to add another css file in the header on every page. In earlier versions, I would have
- Copied app/design/frontend/base/default/layouts/page.xml to app/design/frontend/my_package/my_theme/layouts/page.xml
Add my action to the appropriate block in app/design/frontend/my_package/my_theme/layouts/page.xml
<default translate="label" module="page"> <label>All Pages</label> <block type="page/html" name="root" output="toHtml" template="page/3columns.phtml"> <block type="page/html_head" name="head" as="head"> ... <action method="addItem"><type>skin_css</type><name>css/my_header.css</name><params/><if>lt IE 8</if></action> </block> ... </block> ... </default>
From what I understand, the theme fallback in 1.9 is supposed to keep you from having to copy from the base .xml files. Following what I found at Layout updates in theme.xml, I attempted this using the following:
app/design/frontend/my_package/my_theme/etc/theme.xml:
<?xml version="1.0"?>
<theme>
<parent>rwd/default</parent>
<layout>
<updates>
<default_page>
<file>my_theme/page.xml</file>
</default_page>
</updates>
</layout>
</theme>
app/design/frontend/my_package/my_theme/layout/page.xml:
<layout version="0.1.0">
<default translate="label" module="page">
<block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
<block type="page/html_head" name="head" as="head">
<action method="addItem"><type>skin_css</type><name>css/my_header.css</name><params/><if><![CDATA[<!--[if (gte IE 9) | (IEMobile)]><!-->]]></if></action>
</block>
</block>
</default>
</layout>
Doing this kills my theme as well as the RWD theme. What am I missing? I know I could just copy it as in previous versions. What's the right way to do this?