Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Wincent 5 posts 75 karma points
    May 27, 2016 @ 09:01
    David Wincent
    0

    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.

  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    May 27, 2016 @ 09:26
  • David Wincent 5 posts 75 karma points
    May 27, 2016 @ 12:53
    David Wincent
    0

    Yes.

    Is it possible to make a config option?

    When we use Umbraco for single-page-applications we usually dont create any hijacked routes.

  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    May 27, 2016 @ 13:10
    Shannon Deminick
    0

    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.

  • David Wincent 5 posts 75 karma points
    May 27, 2016 @ 14:03
    David Wincent
    0

    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

  • Brian Lacy 28 posts 101 karma points
    Jun 07, 2016 @ 19:08
    Brian Lacy
    0

    I also think this sounds like the best option -- provides the greatest flexibility.

Please Sign in or register to post replies

Write your reply to:

Draft