Skip to content

Commit

Permalink
check for flash helper before call it, and put the statement back bef…
Browse files Browse the repository at this point in the history
…ore the content.
  • Loading branch information
eymen-elkum committed May 12, 2015
1 parent c03456f commit 36e5f5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Template/Layout/default.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ $this->prepend('tb_body_attrs', ' class="' . implode(' ', array($this->request->
if (!$this->fetch('tb_body_start')) {
$this->start('tb_body_start');
echo '<body' . $this->fetch('tb_body_attrs') . '>';
echo $this->Flash->render();
$this->end();
}
if (!$this->fetch('tb_body_end')) {
Expand Down Expand Up @@ -86,6 +85,9 @@ $this->prepend('script', $this->Html->script(['jquery/jquery', 'bootstrap/bootst

<?php
echo $this->fetch('tb_body_start');
if (isset($this->Flash)) {
echo $this->Flash->render();
}
echo $this->fetch('content');
echo $this->fetch('tb_footer');
echo $this->fetch('script');
Expand Down

0 comments on commit 36e5f5a

Please sign in to comment.