Monday, April 22, 2013

Re: Formatar a mensagem - $this->Session->setFlash(__('minha msg'));



--

Luiz Antonio S Messias
Desenvolvedor Web



2013/4/22 Anderson Moraes <anderson.b4w@gmail.com>
 Boa tarde pessoal,

Então, na página default.ctp eu tenho a seguinte linha: <?php echo $this->Session->flash(); ?>
Quando uma mensagem é setada é essa linha que exibe, correto?

Então se eu tenho uma mensagem de sucesso: $this->Session->setFlash(__('Usuário cadastrado com sucesso.')); eu gostaria que o background-color da minha mensagem fosse verde e só exibisse o vermelho em casos onde a mensagem tenha uma relação negativa, ex.: $this->Session->setFlash(__('Usuário ou senha inválidos.'));

o CakePHP 2.x tem alguma forma de informar qual "style" usuar na mensagem???

Grato desde já,

Anderson

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: