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 am in need of a content context in my nupicker datatype to be passed to the macroviewpage.
I have added contextId via parameters but that's only set in an existing node.
Is there any way to see the parentid for a new node? Or is it just not possible?
well of course in the case of a MacroViewPartial being called from nuPickers, there's a always a request object :)
This does the job for me:
var contextContent = Umbraco.TypedContent(Model.MacroParameters["contextId"]);
if (Model.MacroParameters["contextId"] == null)
if (Request.QueryString["parentId"] != null)
var parentContent = Umbraco.TypedContent(Request.QueryString["parentId"]);
if (parentContent != null)
contextContent = parentContent;
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted