使客户登录magento中的第3页列布局

时间:2017-01-25 12:00:47

标签: magento

我是magento的新人。我想让客户登录第3页列布局,默认为1列。我从某个地方获得了代码,使其成为3列布局。

<customer_account_login>
  <reference name="root">
     <action method="setTemplate">
           <template>page/3columns.phtml</template>      
     </action>
  </reference>
</customer_account_login>

但我不知道在哪里编写此代码以使客户登录第3页列布局。

2 个答案:

答案 0 :(得分:1)

<customer_account_login translate="label">
    <label>Customer Account Login Form</label>
    <!-- Mage_Customer -->
    <reference name="left">
        <block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
    </reference>
    <reference name="right">
        <block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
    </reference>
    <reference name="root">
        <action method="setTemplate"><template>page/3columns.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
    </reference>
</customer_account_login>

答案 1 :(得分:1)

转到app\design\frontend\rwd\default\layout\customer.xml打开customer.xml文件

您将拥有此类客户登录页面的代码

<customer_account_login translate="label">
        <label>Customer Account Login Form</label>
        <!-- Mage_Customer -->
        <remove name="right"/>
        <remove name="left"/>

        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
        </reference>
</customer_account_login>

此行<action method="setTemplate"><template>page/1column.phtml</template></action>page/1column.phtml更改为page/3columns.phtml

但是为此你应该在3columns.phtml中有app\design\frontend\rwd\default\template\page\个文件。如果您还没有创建3columns.phtml并将此代码放入其中。

<!DOCTYPE html>

<!--[if lt IE 7 ]> <html lang="<?php echo $this->getLang(); ?>" id="top" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="<?php echo $this->getLang(); ?>" id="top" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="<?php echo $this->getLang(); ?>" id="top" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="<?php echo $this->getLang(); ?>" id="top" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="<?php echo $this->getLang(); ?>" id="top" class="no-js"> <!--<![endif]-->

<head>
<?php echo $this->getChildHtml('head') ?>
</head>
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
<?php echo $this->getChildHtml('after_body_start') ?>
<div class="wrapper">
    <?php echo $this->getChildHtml('global_notices') ?>
    <div class="page">
        <?php echo $this->getChildHtml('header') ?>
        <div class="main-container col3-layout">
            <div class="main">
                <?php echo $this->getChildHtml('breadcrumbs') ?>
                <div class="col-wrapper">
                    <?php // This left_first block will display above the main content on smaller viewports ?>
                    <?php if ($_leftContent = $this->getChildHtml('left_first')): ?>
                        <div class="col-left sidebar col-left-first"><?php echo $_leftContent;   ?></div>
                    <?php endif; ?>
                    <div class="col-main">
                        <?php echo $this->getChildHtml('global_messages') ?>
                        <?php echo $this->getChildHtml('content') ?>
                    </div>
                    <div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
                </div>
                <div class="col-right sidebar"><?php echo $this->getChildHtml('right') ?></div>
            </div>
        </div>
        <?php echo $this->getChildHtml('footer_before') ?>
        <?php echo $this->getChildHtml('footer') ?>
        <?php echo $this->getChildHtml('global_cookie_notice') ?>
        <?php echo $this->getChildHtml('before_body_end') ?>
    </div>
</div>
<?php echo $this->getAbsoluteFooter() ?>
</body>
</html>

如果您使用的是其他主题,请转到your theme folder rwd values-hdpi values-large values-sw600dp

相关问题