2010-07-23 56 views

回答

17

首先,確定聯繫頁面的「佈局句柄」。如果this是你在談論的頁面,那麼你的佈局句柄是

contacts_index_index 

接下來,找到佈局處理您layout.xml文件

<contacts_index_index translate="label"> 
    <label>Contact Us Form</label> 
    <reference name="root"> 
     <action method="setTemplate"><template>page/2columns-right.phtml</template></action> 
     <action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action> 
    </reference> 
    <reference name="content"> 
     <block type="core/template" name="contactForm" template="contacts/form.phtml"/> 
    </reference> 
</contacts_index_index> 

更改setTemplate呼叫參考模板

<reference name="root"> 
    <action method="setTemplate"><template>page/1column.phtml</template></action> 
    <action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action> 
</reference> 

或者,手柄引用添加到您的local.xml文件。該local.xml文件最後應用,所以無論去那裏「勝」

<layout> 
    <contacts_index_index> 
     <reference name="root"> 
      <action method="setTemplate"><template>page/2columns-left.phtml</template></action>  
     </reference> 
    </contacts_index_index> 
</layout> 
6

接觸頁面的佈局設置在contacts.xml。因此,另一種方法是:在基地佈局文件夾
2.複製該文件中的內容
3.創建模板
的佈局文件夾的新contacts.xml文件

1.查找contacts.xml 4.粘貼文件的內容,發現設置默認佈局

<reference name="root"> 
    <action method="setTemplate"><template>page/2columns-left.phtml</template></action> 
    <action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action> 
</reference> 

5.更改了該行以任何你想要的行默認的佈局是

<reference name="root"> 
    <action method="setTemplate"><template>page/1column.phtml</template></action> 
    <action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action> 
</reference> 

6.保存,並且它覆蓋默認佈局

1

首先,查找contacts.xml在基座佈局文件夾,然後在41線,

變化從

<action method="setTemplate"><template>page/2columns-right.phtml</template></action> 

這個代碼
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>