Copied to clipboard

Flag this post as spam?

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


  • David W. 159 posts 284 karma points c-trib
    Feb 14, 2014 @ 13:28
    David W.
    0

    Template and MacroContainer

    Trying to figurte out how to output/render a macro from a macrocontainer in my template. The Macro itself is a old ascx-type usercontrol int this case. Doing @Umbraco.Field("myMacro") outputs:

    <!--?UMBRACO_MACRO macroAlias="myMacro" /-->

    formatted as a html comment. I should definetly know how to do this, but i dont.

    /D

  • Tom 120 posts 448 karma points
    Feb 27, 2014 @ 21:32
    Tom
    0

    Did you find out how, David?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 27, 2014 @ 23:58
    Dennis Aaen
    0

    Hi Tom and David,

    Have you tried something liked this:

    @Html.Partial("myMacro")

    The documentation can you find here: http://our.umbraco.org/documentation/Reference/Mvc/partial-views

    Hope this helps,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft