Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Breaking out of “Content” [FIXED]
 
SwiftCol
Sr. Member
 
Total Posts:  85
Joined:  2008-05-22
 

I have a new module that I am working on. Currently my frontside layout XML files reads like this:

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
        <!-- -->
    </default>
    
    <
scms_index_index>
        <
reference name="content">
            <
block type="core/template" name="scms" template="scms/scms.phtml" />
        </
reference>
    </
scms_index_index>
    
    <
scms_home_index>
        <
reference name="content">
            <
block type="core/template" name="home" template="scms/home.phtml" />
        </
reference>
    </
scms_home_index>
</
layout>

When I view my module, it places the contents of scms/scms.phtml inside the content block of Magento’s default 3 column layout. I don’t know how to override this. How can I tell my module to use a different main template to put the content in my phtml file into?

THE SOLUTION:
To eliminate the left and right columns, I added this:

<remove name="right"/>
<
remove name="left"/>

And to reset the root template, I added this:

<reference name="root">
    <
action method="setTemplate"><template>page/1column.phtml</template></action>
</
reference>
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top