Copied to clipboard

Flag this post as spam?

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


  • riski 11 posts 101 karma points
    Jun 14, 2017 @ 05:27
    riski
    0

    How call Macro in master template

    Hallo, i have question how call macro(usercontrol) in umabraco admin template->master, if i insert using content page the macro working, but how call in template->master.

    thanks

  • Marc Goodson 1451 posts 9716 karma points MVP 5x c-trib
    Jun 17, 2017 @ 18:22
    Marc Goodson
    0

    Hi riski

    you can use

    @Umbraco.RenderMacro("yourMacroAlias")

    to render a macro within a template.

    There is some info here on passing parameters:

    https://our.umbraco.org/documentation/reference/templating/Mvc/views#renderingMacros

    regards Marc

  • 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