Copied to clipboard

Flag this post as spam?

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


  • suzyb 474 posts 932 karma points
    Mar 23, 2015 @ 11:28
    suzyb
    1

    Change display for admin

    I feel this should be obvious but I can't think how I would go about it.  Is it possible to change the rendering of the doc type for the admin only.

    I render out some links in my partial but don't want to render them in the admin as the user ends up clicking the link and navigating away from the page editor.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 23, 2015 @ 11:35
    Matt Brailsford
    101

    Hi Suzy,

    Sure thing. Inside your partial view you should be able to do the following:

    @if(Request.QueryString["dtgePreview"] == "1"){
        // Render backoffice view
    } else {
        // Render front end view
    }
    

    Hope this helps

    Matt

  • suzyb 474 posts 932 karma points
    Mar 23, 2015 @ 13:28
    suzyb
    0

    That works perfectly.  Thanks Matt.

    And thanks guys for the great package.  It's already coming in really handy.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 23, 2015 @ 14:28
    Matt Brailsford
    0

    No worries. I've added an extra note within the developers guide now aswell just in case anyone else is wondering.

    Thanks for bringing it to our attention. It's easy to forget things others might not know when you develop something like this, so great to have the feedback from users to prompt us to include it.

    Many thanks

    Matt

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 23, 2015 @ 15:51
    Matt Brailsford
    0

    Hey Suzy,

    We are reviewing options for making this more intuitive, would love your feedback.

    https://github.com/leekelleher/umbraco-doc-type-grid-editor/issues/4

    Many thanks

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft