Is there a possibility to limit output of shown links / assets?

For medium to large pages with many pages of the same type that have images for each, it is hard to differentiate, which link or file to use in the available editors if you have many subpages that are structured the same way.

Example page structure:

Home (NodeType: The.Site:Document.Home)
|- Project 1 (NodeType: The.Site:Document.ProjectHome)
|  |- Section 1
|  |- Section 2
|  |- Section 3
|  |- Section 4
| - Project 2
|  |- Section 1
|  |- Section 2
|  |- Section 3
|  |- Section 4
| - Project 3
|  |- Section 1
|  ... tbc

Therefore we would like to limit the shown results of each project to only the pages in the current project. This could be achieved in the LinkEditor using ClientEval and write the startingPoint anywhere on the page. Something like this:

# Fusion part
bodyTag.attributes.data-linkbase = ${q(documentNode).context({'invisibleContentShown': true}).closest('[instanceof The.Site:Document.ProjectHome],[instanceof The.Page:Document.Home]').property('_path')}

# yaml definition
properties:
  link:
    ui:
      inspector:
        editorOptions:
          startingPoint: "ClientEval: document.querySelector('[name=neos-content-main]')?.contentDocument.body.getAttribute('data-linkbase')"

But the same is not possible for links created in inline editable fields (ClientEval does not work for linking properties for ckeditor). Using an Aspect also doesn’t work, as the current node isn’t sent to the server in the search-request for nodes in the inline-editor link option.

Another problem exists with Assets. I was not able to find a way to limit the shown assets in an asset field in the sidebar to a given Collection or Tag (you can, when opening the media browser, but i want to limit it from the search). Here it would also be great to be able to dynamically define the tag/collection as done for the link editor and use it if available. This could (right now) only be achieved when using a custom datasource. But then you loose the ability to use the media browser and direct upload. Is there a way to define a tag / collection to limit the shown assets in the asset editor when searching?

I hope i made this clear and someone can help here.

Best regards,

Benjamin

Nobody?

Hi,

yes the inline linking editor cannot do this currently but it’s probably not so hard to fix there too. You can create an issue for neos-ui and see if you can add the feature for Neos 7.1.
I can help you if you want.

The asset related topic is not possible currently but probably an interesting feature request for the new Media UI. Would be great if you could open an issue there https://github.com/Flowpack/media-ui/issues.
Currently it would only be possible by creating a custom image editor of the Neos UI which does most of the old one but allows some options to be forwarded to the module.

Thanks for your feedback. I added a new issue to the Neos-UI here: https://github.com/neos/neos-ui/issues/2885. I will try to create a PR maybe next week if I have a little time.

I will also add an issue for the new Media UI later. I will also try to get some sponsoring for that hopefully.

1 Like