Target module with custom layout in Magento

Posted by dardub on Stack Overflow See other posts from Stack Overflow or by dardub
Published on 2010-05-26T20:37:11Z Indexed on 2010/05/26 20:41 UTC
Read the original article Hit count: 277

Filed under:
|

In my custom module, I'd like to include an extra block and style sheet that targets only pages within my custom module. So that when i access myserver.com/configurator/

Pages will use the correct template I specified

In the catalog.xml file, I noticed

<catalog_category_default>

That seems to be what I am looking for, so I tried:

<configurator_default_default>
    <reference name="root">
        <action method="setTemplate"><template>configurator/2columns-right.phtml</template></action>
    </reference>
   <reference name="head">
            <action method="addCss"><stylesheet>css/configurator.css</stylesheet></action>
   </reference>
   <reference name="content">
             <block type="configurator/guide" name="timeline" template="configurator/guide/timeline.phtml" />
    </reference>
</configurator_default_default>

But it doesn't change the template for pages within the module.

I also tried

<configurator_guide_default>

But it doesn't pick up the correct template

If i put it within the specific page such as

<configurator_guide_page1>

Then it works.

© Stack Overflow or respective owner

Related posts about php

Related posts about magento