I am currently working on a meta data prototype where I store asset meta data as nodes. For these meta data nodes I created a root “meta” aside to “sites”
Now I want to query these nodes with something like:
This meens, I need to at a “meta” root node to the node context. What is the way to go here?
To try it out, I currently changed the context creation in the TypoScriptView like that:
Maybe a simple way to make this extendable, is to emit a signal and passing the initialized context array to this signal, like this:
In your package, just listen to the signal and update the array
Feel free to send a PR with the code, it’s one of those “unplanned” extension point where you can break every thing, but when used carefully it can help a lots, maybe @sebastian or @christianm can you give us your POV ?
I would rather not want to go down that route because I feel Signal/Slot should be a one way route and using references to change something is a hack that might hit us back at some point.
I would rather want to make this extensible in some other way. I mean you can always @context in root, we just need the capability to query for the “meta” node inside of TypoScript.
I know due to the way it is constructed this will not easily work but something in the lines of it could be a way to go:
I also thought of a signal, but I agree with @christianm’s concerns about changing something with a signal should not be the way we should suggest. @christianm - If I get you right, the Flowquery you proposed is just an idea but not working yet? If not - we should make that possible.
For adding context from within a package - I would prefer a way using PHP to have a minimum of interference with users TypoScript.