Disable layout in plugin action

Hi,

I would like to disable the Fluid layout in a plugin action.
I created an action in a plugin, that should only return the HTML from the rendered template of the action, not the complete layout (including and …). The reason for that is, It is being called via AJAX.

I already found this exact subject in the Neos documentation:

If you reuse an existing flow-package a plugin in Neos and check the HTML of a page that includes your plugin, you will clearly see that things are not as they should be. The plugin is included using its complete HTML, including head and body tags. This of course results in an invalid document.

To improve that you can add a Configration/Views.yaml file to your Package that can be used to alter the used template and views based on certain conditions. The documentation for that can be found in the Flow Framework Documentation.

However, I cannot find any details about how to do that in die Flow documentation.

Could anyone point me into the right direction?

Hi,

http://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartIII/ModelViewController.html#configuring-views-through-views-yaml

This is the section you need

I found that already and I can see how I could match the action, but how would I disable the layout?

You can use the options to set specific rendering configuration when the requestFilter matches your plugins combination. In that way you can override the whole rendering path, use a different template, depending on whether you use FusionView og the Fluid based TemplateView