Skip to content

Question using SF 3.4 #75

Description

@rashaw1968

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions