It is the following, I have a project page that serves as the default for all the others, a Layout .. But I wanted to add an item (informative) to it, and it only stays on the homepage and CRUD of the informations, when goes to other pages that happens to the controller exchange, gives error and the informative ones disappear. Could anyone help ??
layout page:
<div class="col-md-8">
<div id="c-slide" class="carousel slide auto panel">
<div class="carousel-inner">
<?php foreach ($informativos as $index => $informativo){ ?>
<div class="item text-center<?php echo ($index === 0 ? " active" : "") ?>" style="width: 90%;margin-left:5%">
<div class="alert alert-block alert-<?php echo $informativo['Informativo']['tipo']; ?> fade in">
<?php echo $informativo['Informativo']['texto']; ?>
</div>
</div>
<?php } ?>
</div>
<a data-slide="prev" href="#c-slide" class="left carousel-control">
<i class="fa fa-angle-left"></i>
</a>
<a id="nextInformativo" data-slide="next" href="#c-slide" class="right carousel-control">
<i class="fa fa-angle-right"></i>
</a>
</div>
</div>
App Controller:
public $helpers = array(
'Gravatar.Gravatar',
'Html',
'Form',
'Session'
);
public $components = array(
'Auth' => array(
'authenticate' => array('Saml.Saml')
),
'Session',
'Cookie');
var $uses = array('User');
public function beforeFilter() {
parent::beforeFilter();
$this->set('convertTime', $this->convertTime);
if ($this->Saml){
if ($this->Saml->isAuthenticated()) {
$infoWSO2 = $this->Saml->getAttributes();
if($this->Session->read('UsuarioLogado') == NULL){
$userSistema = $this->User->atualizaSessao($infoWSO2);
$this->Session->write('UsuarioLogado', $userSistema);
}
$this->set('login_user', $infoWSO2);
}
}
}