Copied to clipboard

Flag this post as spam?

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


  • Paulo Santos 11 posts 94 karma points
    Dec 13, 2016 @ 11:15
    Paulo Santos
    1

    Render a Macro from a SurfaceController View

    I just created a SurfaceController and on its view I called

     @Umbraco.RenderMacro("MacroName")
    

    I get this error:

    InvalidOperationException: Cannot render a macro when there is no current PublishedContentRequest

    I don't understand why a Macro would depend on a current page? Is there any way around this?

Please Sign in or register to post replies

Write your reply to:

Draft