Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更改Magento中联系人表单的列布局_Magento - Fatal编程技术网

更改Magento中联系人表单的列布局

更改Magento中联系人表单的列布局,magento,Magento,在哪里可以更改Magento中默认联系人页面的列布局(左2列、右2列等) 谢谢首先,确定联系人页面的“布局句柄”。如果是您正在谈论的页面,那么您的布局句柄是 contacts_index_index 接下来,在layout.xml文件中找到布局句柄 <contacts_index_index translate="label"> <label>Contact Us Form</label> <reference name="root"&

在哪里可以更改Magento中默认联系人页面的列布局(左2列、右2列等)

谢谢

首先,确定联系人页面的“布局句柄”。如果是您正在谈论的页面,那么您的布局句柄是

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>