"Normal" Action Links inside Content-Plugins?


I have created a new Plugin, what is showing a Controller-Actions View-Fluid-Template.

When I am creating <f:link.action> links inside this template, they are are
generated like this:


In my template: <f:link.action package=“My.Package” action=“testJson” controller=“TestJson” format=“json” arguments="{email: ‘Blaaaaa’, name: ‘bluuuububbbbfdfdg’}" > JSON </f:link.action>

I want to create a normal action-link-route, like “http://neos.local/mysuperapi/getdata”.

I have created this route (and i can visit this route by manual typing):

name: ‘TestRoute MySuperApi’
uriPattern: ‘mysuperapi/{@action}’
@package’: ‘My.OtherPackage’
@controller’: ‘MySuperApi’
@format’: ‘json’

But when I use
<f:link.action package=“My.OtherPackage” action=“getData” controller=“MySuperApi” format=“json” arguments="{email: ‘Blaaaaa’, name: ‘bluuuububbbbfdfdg’}" > JSON </f:link.action>
it will create a Link to the current page and with these “plugin prefix arguments”…

THE ISSUE IS, that when I call:


then I get a JSON what is wrapped by the HTML-Fluid-LAYOUT.

But when I call “http://neos.local/mysuperapi/getdata” manually, then I get only the JSON, without surrounding HTML-LAYOUT…

Soo, what have I to do, to create “normal” Action-Links routes like “http://neos.local/mysuperapi/getdata

Ayy, after more testing saw, that useParentRequest=“true” will bring me the URL what I was looking for!

Before, I still got some routing-errors when using useParentRequest=“true”,
I will have to clean-up my routing configurations…

The plugin routes is (in terms of Routing in Flow) a argument, being passed on to the request.
So to create nice form your plugin, you need configurations similar to this (from this link, modified with new namespace)

  name: 'Nice urls for my plugin'
  uriPattern:    '{node}/getdata'
    '@package':    'Neos.Neos'
    '@controller': 'Frontend\Node'
    '@action':     'show'
    '@format': 'html'
      '@package': 'My.OtherPackage'
      '@controller': 'MySuperApi'
      '@action': 'getData'
      '@format': 'json'
      handler:    Neos\Neos\Routing\FrontendNodeRoutePartHandlerInterface
  appendExceedingArguments: FALSE