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