【发布时间】:2014-10-15 02:07:08
【问题描述】:
我正在使用 Fuelux 向导组件在我的应用程序上设置向导。这是我模板上的 HTML 标记:
<div class="wizard" data-initialize="wizard" id="myWizard">
<ul class="steps">
<li data-step="1" class="active"><span class="badge">1</span>Step 1<span class="chevron"></span></li>
<li data-step="2"><span class="badge">2</span>Step 2<span class="chevron"></span></li>
<li data-step="3"><span class="badge">3</span>Step 3<span class="chevron"></span></li>
</ul>
<div class="actions">
<button class="btn btn-default btn-prev"><span class="glyphicon glyphicon-arrow-left"></span>Previous</button>
<button class="btn btn-default btn-next" data-last="Complete">Next<span class="glyphicon glyphicon-arrow-right"></span></button>
</div>
<div class="step-content">
<div class="step-pane active sample-pane" data-step="1">
// here goes the firstStep
</div>
<div class="step-pane sample-pane " data-step="2">
// here goes the secondStep
</div>
<div class="step-pane sample-pane" data-step="3">
// here goes the thirdtStep
</div>
</div>
</div>
这是ControllerStep 上的displayAction 方法:
public function displayAction(ProcessContextInterface $context)
{
$entity = new Producto();
$form = $this->createForm(new FirstStepFormType(), $entity);
return $this->render('RPNIBundle:Producto:_paso1.html.twig', array(
'entity' => $entity,
'form' => $form->createView())
);
}
如何将displayAction 输出渲染到应该去的地方?在这种情况下,文本// here goes the firstStep 在哪里?如何管理模板中的Previos/Next 链接?
【问题讨论】:
标签: php symfony symfony-forms sylius