大家好,
当用户取消订阅时事通讯时,我试图给他们一个确认消息。但我只收到确认信息没有其他网站。
这是网址这样你就能看到发生了什么..。
在取消订阅控制器类中,我有以下代码来呈现页面:
$this->language->load('newsletter/unsubscribe');
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);
$this->template = 'default/template/newsletter/newsletter.tpl';
$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);
$this->response->setOutput($this->render());我的模板文件如下所示:
<div class="box">
<div class="box-heading">Uitschrijven</div>
<div class="box-content">
<div id="notification">
<div class="success" style="">
U bent succesvol uitgeschreven.
<img src="catalog/view/theme/metroshop/image/close.png" alt="" class="close">
</div>
</div>
</div>
</div>当我查看另一个(产品控制器或帐户,以及google )时,它说这是正确的呈现页面的方式(就像孩子那样)。但是正如你所看到的,孩子们(网站的其他部分)没有被渲染。
我错过了什么?为什么这不管用?
发布于 2013-08-22 10:19:52
好吧,我想通了。我可以删除我的问题,但也许这会对未来的人有所帮助,所以我现在回答.
我的模板文件如下所示:
<div class="box">
<div class="box-heading">Uitschrijven</div>
<div class="box-content">
<div id="notification">
<div class="success" style="">
U bent succesvol uitgeschreven.
<img src="catalog/view/theme/metroshop/image/close.png" alt="" class="close">
</div>
</div>
</div>
</div>那只是内容。但你也需要回显页眉,页脚和诸如此类的东西。所以你得做些这样的事
<?php echo $header; ?>
<?php echo $column_left; ?>
<?php echo $column_right; ?>
<div id="content">
<?php echo $content_top; ?>
<h1 style="display: none;">
<?php echo $heading_title; ?>
</h1>
<div class="box">
<div class="box-heading">Uitschrijven</div>
<div class="box-content">
<div id="notification">
<div class="success" style="">
U bent succesvol uitgeschreven.
<img src="catalog/view/theme/metroshop/image/close.png" alt="" class="close">
</div>
</div>
</div>
</div>
<?php echo $content_bottom; ?>
</div>
<?php echo $footer; ?>现在效果很好。希望这会对未来有所帮助。
https://stackoverflow.com/questions/18377424
复制相似问题