I need to know if it’s
possible to edit the preview functionality, to show a parent node whit a specific
nodeTypeAlias.
Iam building a document
system in umbraco, a document contains seweral childnodes of different document
types, but i need to insure if a user press preview on a child document the preview button shows the document, and not the
childnode.
There's not really any built-in control of the Preview button that I know of. Maybe you can have the templates of your child documents perform a redirect to their parent? Not sure if it would work properly or not, but you could try. You could test for preview mode by checking for the UMB_PREVIEW cookie and redirecting to /<parentnodeid>.aspx
In theory, of course :)
You could also remove the preview button programatically and replace it with your own, but would probably take some work to have it replicate the OOTB functionality
Edit preview functionality
Hi.
I need to know if it’s possible to edit the preview functionality, to show a parent node whit a specific nodeTypeAlias.
Iam building a document system in umbraco, a document contains seweral childnodes of different document types, but i need to insure if a user press preview on a child document the preview button shows the document, and not the childnode.
A fast/psuedo code example would be great.
Best regards
/Jacob
Hi Jacob,
There's not really any built-in control of the Preview button that I know of. Maybe you can have the templates of your child documents perform a redirect to their parent? Not sure if it would work properly or not, but you could try. You could test for preview mode by checking for the UMB_PREVIEW cookie and redirecting to /<parentnodeid>.aspx
In theory, of course :)
You could also remove the preview button programatically and replace it with your own, but would probably take some work to have it replicate the OOTB functionality
-Tom
is working on a reply...