Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flashes in twig #11

Open
purrplingcat opened this issue Dec 12, 2017 · 0 comments
Open

Flashes in twig #11

purrplingcat opened this issue Dec 12, 2017 · 0 comments

Comments

@purrplingcat
Copy link

purrplingcat commented Dec 12, 2017

Hi, I have a problem with flashes in twig. I want pop stack of flash and write messages to template. For pop stack i use shift() like written in doc. But it's not works. Twig not support while loop, only for with syntax for <i> in <source>. Useless for pop flash stack.

{% for alert in flash.shift() %}
    <div class="alert alert-{{alert.type}} alert-dismissible fade show general-alert" role="alert">
      {{alert.message}}
      <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        <span aria-hidden="true">&times;</span>
      </button>
    </div>
{% endfor %}

How I solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant