I've made an extension that requires some dynamically set .js and .css files. Using the default theme I added them in through a template set in a block in the head like this:
<layout version="0.1.0"> <...> <default> <reference name="head"> <block type="core/template" name="myextension" template="myextension/mymodule/myincludes.phtml" /> </reference> </default> <...> </layout>
Which calls my file located at ...app\design\frontend\default\default\template\myextension\mymodule\myincludes.phtml and declared it in my extension's config.xml thusly:
<config> <...> <frontend> <...> <layout> <updates> <mymodule> <file>myextension.xml</file> </mymodule> </updates> </layout> </frontend> <...> </default> <adminhtml> <...> <layout> <updates> <myextension> <file>myextension.xml</file> </myextension> </updates> </layout> </adminhtml> </config>
This all works wonderfully on the default theme, my template is added to the theme, and the js and css files it calls work perfectly and make me happy. When I switch to the theme "flatastic" my "myincludes.phtml" doesn't seem to get added to the head and everything breaks.
I should add that the other parts of my extension seem to work fine even when the layout changes don't. For example all my admin config options are fine, a controller is still accessible, etc.
I'm new to magento, and assumed that the theme was just overwriting some of the templates I had changed, but i'm calling a completely custom template in a new block.
Am I doing something wrong in the way I add it?
Does a different theme add considerations I don't know about yet?
What should I look for when a theme breaks my layout changes in an extension?