Copied to clipboard

Flag this post as spam?

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


  • Elad Lachmi 112 posts 144 karma points
    Mar 16, 2012 @ 23:16
    Elad Lachmi
    0

    Simple macro - total noob (4.7)

    Hi,

    This is the first razor macro I'm writing. I can't seem to get this to work.

    I have the following code inline with the template HTML:

    <umbraco:Macro Language="cshtml" runat="server">
    if(@Model.HasValue("reviewLink"))
            {
            <href="@Model.reviewLink">@Model.brokerName Review</a>
            }
    </umbraco:Macro>

    and I keep getting "Error loading Razor Script". Please help a noob out :)

     

     

     

     

     

  • Rodion Novoselov 694 posts 859 karma points
    Mar 17, 2012 @ 08:42
    Rodion Novoselov
    0

    Hi. Simply try to spell your @Model.brokerName as @(Model.brokerName).

Please Sign in or register to post replies

Write your reply to:

Draft