Copied to clipboard

Flag this post as spam?

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


  • Kevin Lawrence 183 posts 350 karma points
    Apr 01, 2014 @ 16:09
    Kevin Lawrence
    0

    Hijack route, but not for RenderTemplate calls

    Hi all

    Using the directions described here:

    http://our.umbraco.org/documentation/reference/Templating/Mvc/custom-controllers

    I have setup a default controller to handle all requests, the reason for this is to handle redirects (i.e. switch page to HTTPS etc.).

    This works great, except that it's overriding calls from Umbraco.RenderTemplate, so for these requests I just want to ignore.

    Is there anyway of achieving this?

    Thanks

    Kev

  • Kevin Lawrence 183 posts 350 karma points
    Apr 01, 2014 @ 16:40
    Kevin Lawrence
    100

    Ok after a bit more investigation I discovered:

    UmbracoContext.PublishedContentRequest.IsInitialPublishedContent

    Which indicates whether this is the initial content being rendered.

    Kev

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Mar 13, 2015 @ 13:50
    Dave Woestenborghs
    0

    Hi,

    Where do use this code. I want to use rendertemplate in a event and have some issues.

     

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft