I've got a node which contains a set of data, which users can add to/remove from. However, this node does not have a template and can therefore not be previewed using the Preview button in the CMS.
I was wondering if there was a way to redirect to an ancestor node when the Preview button is clicked, as the set of data is rendered on an ancestor.
Changing Umbraco's core in umbraco.controller.js is the last thing I want to do, so is there a more simpler way to resolve this?
Preview Different Node in CMS
Hello!
I've got a node which contains a set of data, which users can add to/remove from. However, this node does not have a template and can therefore not be previewed using the Preview button in the CMS.
I was wondering if there was a way to redirect to an ancestor node when the Preview button is clicked, as the set of data is rendered on an ancestor.
Changing Umbraco's core in umbraco.controller.js is the last thing I want to do, so is there a more simpler way to resolve this?
Thanks
For anyone who sees this in future:
I solved this by adding an event handler which fires on page requests:
Source of my answer was found at: https://our.umbraco.org/forum/developers/api-questions/47762-redirect-all-nodes-with-no-template-to-ancestor-with-a-template-
is working on a reply...