更改Magento中联系人表单的列布局
在哪里可以更改Magento中默认联系人页面的列布局(左2列、右2列等) 谢谢首先,确定联系人页面的“布局句柄”。如果是您正在谈论的页面,那么您的布局句柄是更改Magento中联系人表单的列布局,magento,Magento,在哪里可以更改Magento中默认联系人页面的列布局(左2列、右2列等) 谢谢首先,确定联系人页面的“布局句柄”。如果是您正在谈论的页面,那么您的布局句柄是 contacts_index_index 接下来,在layout.xml文件中找到布局句柄 <contacts_index_index translate="label"> <label>Contact Us Form</label> <reference name="root"&
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>
联系人页面的布局在contacts.xml中设置。因此,另一种方法是:
1.在基本布局文件夹中查找contacts.xml
2.复制该文件中的内容
3.在模板的布局文件夹中创建一个新的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>
第页/2列-left.phtml
联系我们
五,。将该行更改为您希望的默认布局<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>
第/1页column.phtml
联系我们
六,。保存,并覆盖默认布局首先,在基本布局文件夹中查找contacts.xml,然后在第41行中 将此代码从更改为
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
page/2列-right.phtml
到
page/2列-left.phtml
<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>
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>