[SOLVED] Flashmessages in Neos Backend Modules


I’m trying to output flashmessages in a Backend Module for a Domain Model (Member) on update.
Trying to reverse engineer flashmessages of Neos-Users and Images. (The kind, that appears and disappears)

In my Template i have:

<div class="neos-notification-container">
  <f:flashMessages id="neos-notifications-inline" class=""/>

With this I got the Markup containing my Message.

<div class="neos-notification-container">
  <ul id="neos-notifications-inline">
    <li class="-ok">
      Mitglied Testman gespeichert.

I shuffled everything back and forth but never got the correct CSS and JS.
Here I tried to get rid of a wrong class with:


Flashmessages for Neos Users and Images have a data-attribute, but no class.
It’s a pain …

So the big question:
What has to be done to apply the correct CSS and JS?

Have a nice evening

Hi Klaus :wink:

Just take a look at the existing backend modules. If you use the default BackendModule Layout that already renders the flashmessages using a custom partial

CSS and JS will be applied correctly if it runs in the backend.


Thanks a lot Bastian!

It works, but I had to copy the Layout and the Partial to my package.
I don’t like this copy and paste stuff.
Is it possible to use the templates of my package and the layouts and partials from another package?


I will join the meetup next monday in Düsseldorf.

Yes, have a look at the Views.yaml documentation

That’s great!

…To see Views.yaml in action: https://github.com/neos/media-browser/blob/master/Configuration/Views.yaml

Thanks again Bastian!

That is exactly what I wanted. The templates from my package now use the layout and partial from the Neos package.

Here is my Views.yaml (Neos 2.3)

  requestFilter: 'parentRequest.isPackage("TYPO3.Neos") && isFormat("html") && isPackage("Eg.Member")'
      'TYPO3.Neos': 'resource://TYPO3.Neos/Private/Layouts'
      'TYPO3.Neos': 'resource://TYPO3.Neos/Private/Partials'
1 Like