Skip to content

Instantly share code, notes, and snippets.

@jhauge
Created January 23, 2013 14:08
Show Gist options
  • Save jhauge/4606016 to your computer and use it in GitHub Desktop.
Save jhauge/4606016 to your computer and use it in GitHub Desktop.
Usage of macroscripts without using a macro registered in Umbraco backend
@inherits umbraco.MacroEngines.DynamicNodeContext
@if (Parameter.MyCustomParameter == "showThisNotThat")
{
<div>@Model.MyProperty</div>
}
<!-- Other masterpage stuff -->
<!-- Insert macro -->
<umbraco:Macro runat="server" FileLocation="~/macroscripts/CommentTrack.cshtml" MyCustomParameter="showThisNotThat" />
<!-- Other masterpage stuff -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment