Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

LEVEL_ACTION_VIEW flashSession or flash messages not work

Hello, When I use in my action the code below, the message is not displayed, can anyone help me solve?

$ this-> flashSession-> success ('Message sent successfully!');
$ this-> view-> setRenderLevel (View :: LEVEL_ACTION_VIEW);
$ this-> view-> render ('contact', 'send');

tks.



7.6k
Accepted
answer

maybe your forgot to put <?php $this->flashSession->output() ?> into your view

or

you put it in a view that is not covered before the VIEW_LEVEL that you set. (LEVEL after View :: LEVEL_ACTION_VIEW)

Thanks for your reply.

I checked my page, and I saw that I had forgotten to put the {{content()}} on the top of the page.

tks..