Copied to clipboard

Flag this post as spam?

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


  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Nov 27, 2012 @ 11:42
    Dirk De Grave
    0

    Using IPublishedContent in Razor macro's

    hi,

    i want to avoid using DynamicNode in v4.10+ and therefore would like to replace existing code to use the new goodies available as of v4.10+. But, not sure how to get hold of the "current page" when i'm in a Razor macro script?

    yes, i know i can use the new stuff in views (ie, umbraco views inheriting from UmbracoTemplatePage but unsure what to use in my Razor macro scripts?

    So, what to use instead of

    @inherits umbraco.MacroEngines.DynamicNodeContext

    and using @Current or @CurrentModel?

     

    Cheers,

    /Dirk

     

     

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Nov 27, 2012 @ 11:52
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies