I have a custom content builder in the front-end for users to add content to the website.
I got a base working, also through a workspace for the user, but I can only see the changes in the front-end when they are published to the live workspace.
I would like to implement a “Preview mode”, so that the user in the frontend will see his changes without publishing them and he will be able to publish them through a button.
So, my question is: How do I tell Neos to load the current page from a specific workspace ?
thanks for the example !
Is there a way to specify the desired workspace when fetching the content in fusion ?
For example:
content {
main = PrimaryContent {
nodePath = 'main'
# The next line is imaginary code and doesn't work
workspace = 'my-preview-workspace-identifier'
}
}
Or do I have to fetch the desired content manually from a PHP service ?
I checked how the ContentCollection picks the node and replaced it like so. So, instead of passing the “node” to the NearestContentCollection, I am passing the node from the selected workspace instead. Not sure if I did this properly, please correct me if I can improve this further.