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

Question using SF 3.4 #75

Open
rashaw1968 opened this issue Sep 9, 2018 · 0 comments
Open

Question using SF 3.4 #75

rashaw1968 opened this issue Sep 9, 2018 · 0 comments

Comments

@rashaw1968
Copy link

rashaw1968 commented Sep 9, 2018

I'm using Symfony 3.4 with AlertifyBundle, where I had to add "symfony/assetic-bundle": "^2.8" to my composer.json and enabled both this bundle and the assetic bundle in my AppKernel.

I added the stylesheets and javascripts content to my standard layout html.twig file and I can see that the package is capturing my flashbag alerts as the standard messages are not shown, but I am not seeing any of the Alertify alerts on the screen.

I kept the config simple, as shown here, just using defaults:

troopers_alertify:
   default:
       context: admin
       engine: toastr
       layout: bottomLeft
       translationDomain: messages

assetic:
    debug:          '%kernel.debug%'
    use_controller: '%kernel.debug%'
    filters:
        cssrewrite: ~

Any thoughts on what I could be missing?

My twig content is:

{% block stylesheets %}
    {{ parent() }}
    {% stylesheets
        '@TroopersAlertifyBundle/Resources/public/toastr/css/toastr.css'
    %}
        <link rel="stylesheet" href="{{ asset_url }}" type="text/css" />
    {% endstylesheets %}
{% endblock %}

{% block javascripts %}
    {{ parent() }}
    {% javascripts
        '@TroopersAlertifyBundle/Resources/public/toastr/js/toastr.js'
    %}
        <script src="{{ asset_url }}"></script>
    {% endjavascripts %}
{% endblock %}

And I use standard alerts in my Controller:

$flashbag = $this->get('session')->getFlashBag();
$flashbag->add("success", 'Success');

Thanks!

Rob

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