質問

I am building a registration page using Bootstrap 3 & Magento & I am just wondering what the following line does/outputs:

<?php echo $this->getChildHtml('form_fields_before')?>

Am I using it correctly in the layout below (before the start of the form fields) or should it go somewhere else on the form?

<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
<input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />

<div class="row">
  <div class="col-xs-12">
    <h2><?php echo $this->__('New Customer Registration') ?></h2>
    <p><?php echo $this->__('To register for an account on our website please fill in &amp; submit the form below.') ?></p>

    <?php echo $this->getChildHtml('form_fields_before')?>

    <h3 class="legend"><?php echo $this->__('Personal Information') ?></h3>
    <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
    <h3 class="legend"><?php echo $this->__('Login Information') ?></h3>
    <div class="form-group">
      <label for="email_address" class="required"><?php echo $this->__('Email Address *') ?></label>
      <input type="text" name="email" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" id="email_address" class="form-control required-entry validate-email" title="<?php echo $this->htmlEscape($this->getEmailValue()) ?>" placeholder="Email" />
    </div>
    <div class="form-group">
        <label for="password" class="required"><?php echo $this->__('Password *') ?></label>
            <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="form-control required-entry validate-password" placeholder="Password" />
    </div>
    <div class="form-group">
        <label for="confirmation" class="required"><?php echo $this->__('Confirm Password *') ?></label>
            <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="form-control required-entry validate-cpassword" placeholder="Confirm" />
    </div>
役に立ちましたか?

解決

Actually, this one is no need. You can remove it. Magento template say that "This template is for generic wrapper purposes, including ajax.updater loaded blocks". That already deprecated after 1.4.0.0-alpha3. Please see this under

app/design/frontend/base/default/template/page/html/wrapper.phtml

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top