Copied to clipboard

Flag this post as spam?

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


  • sadegh 2 posts 22 karma points
    Jan 04, 2012 @ 16:37
    sadegh
    0

    How to call XSLT macro within Razor macro?

    Hi,

    I want to use an XSLT macro multiple times in a template file dynamically. So, because I am not familiar with XSLT syntax, I decided to use a simple Razor macro manually definde with an input field that according to it's input field XSLT macro will be repeated.

    Now the problem is: I don't know how to call XSLT macro within Razor macro!

    Is "Macro Container" data type usefull for this issue? and how?

    Thanks in Advance

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Jan 06, 2012 @ 08:46
    Sebastiaan Janssen
    0

    If you're not comfortable with XSLT, why not just replace the whole XSLT with Razor? :-) 

    I think maybe this will work, but to be honest it's painful and I'd just spend the extra time up front to write the XSLT file in Razor:

     

    @Html.Raw(umbraco.library.RenderMacroContent("myMacroAlias",Model.Id))

     

Please Sign in or register to post replies

Write your reply to:

Draft