I'd prefer to not have yet another config option for this. This is quite specific since people could easily install a package that uses route hijacking without physical templates and suddenly they cannot preview since they've changed a config value that they thought they needed. Adding a config value instantly creates some technical debt because it's just a hack.
There are two ways we can make this work:
Check if there is no template assigned and also somehow check if there's a custom controller for the specific content type being displayed in the editor - then hide/show preview accordingly. If there's a custom controller assigned, preview must be shown
Add a property to the ContentItemDisplay model to hide/show the preview button so by using the EditorModelEventManager.SendingContentModel event you can toggle this with your own code
Please create a feature request on the issue tracker if you feel this is an important change.
Is it possible to get the old feature back that hides preview when there is not any template available?
The feature was reverted in version 7.3 Details here: http://issues.umbraco.org/issue/U4-3562
We would like the have this feature back. We often have nodes without templates and the preview button is just confusing in those cases.
Did you see the note: http://issues.umbraco.org/issue/U4-3562#comment=67-19656
Yes.
Is it possible to make a config option?
When we use Umbraco for single-page-applications we usually dont create any hijacked routes.
I'd prefer to not have yet another config option for this. This is quite specific since people could easily install a package that uses route hijacking without physical templates and suddenly they cannot preview since they've changed a config value that they thought they needed. Adding a config value instantly creates some technical debt because it's just a hack.
There are two ways we can make this work:
Please create a feature request on the issue tracker if you feel this is an important change.
The property/attribute option looks better for our use case.
I made a feature request here: http://issues.umbraco.org/issue/U4-8530
Best regards! /David
I also think this sounds like the best option -- provides the greatest flexibility.
is working on a reply...