Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
i want to pass parameter to macro .I pass paramter like that
var id = Parameter.nodeid;
I have Parameter class in my code which conflict with umbraco code
what is namespace with contain parameter to add to solve this conflict????
Hi Mohamed,
Try to call your parameter like this instead:
var id = Model.MacroParameters["nodeid"]
The code you have found, is for passing a parameter in the old legacy razor called DynamicNode, and this razor code is deprecated.
In a MVC View/Partial View or a Partial View Macro, you can pass a parameter to your marco like the code above.
Hope this helps,
/Dennis
is working on a reply...
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.
Continue discussion
Pass parameter to Macro
i want to pass parameter to macro .I pass paramter like that
Hi Mohamed,
Try to call your parameter like this instead:
The code you have found, is for passing a parameter in the old legacy razor called DynamicNode, and this razor code is deprecated.
In a MVC View/Partial View or a Partial View Macro, you can pass a parameter to your marco like the code above.
Hope this helps,
/Dennis
is working on a reply...
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.