is there any easy direct way to get the node Id for current page children or any way to get the Ids for the macro parameters which came by content picker...
I feel it is so easy question but I am stuck there
Model.MacroParameters["page"]//it is give "umb://document/f875c2c828d04a2dbdb2dcf80d841a9f"
Presumably what you actually want is the published content for the document, right? You can do this in the same way as you do for Ids, use the Umbraco helper eg.
var content = Umbraco.TypedContent("umb://document/f875c2c828d04a2dbdb2dcf80d841a9f");
So you can just pass the umb://document string to the helper and it does the work of converting.
If you really need the Id you'd just get it from the content you get back from the helper eg.
Get Node ID for ( children) or (Macro parameters)
Hello There!
is there any easy direct way to get the node Id for current page children or any way to get the Ids for the macro parameters which came by content picker...
I feel it is so easy question but I am stuck there
Model.MacroParameters["page"]//it is give "umb://document/f875c2c828d04a2dbdb2dcf80d841a9f"
but I am expecting Node= 1068
Hope someone can help
thanks
Presumably what you actually want is the published content for the document, right? You can do this in the same way as you do for Ids, use the Umbraco helper eg.
So you can just pass the umb://document string to the helper and it does the work of converting.
If you really need the Id you'd just get it from the content you get back from the helper eg.
as they said
you are the Rock :)
Thanks Daaaaaaaaaan :)
is working on a reply...