on an umbraco7 site i have a document type (say "news") with a property (say "banner") of "MultiNode TreePicker"
In a partial view (/view/partial) that inherits from Umbraco.Web.Mvc.UmbracoTemplatePage i have the following code snippet:
@CurrentPage.banner.GetType() @CurrentPage.banner
and this is the output:
Umbraco.Core.Dynamics.DynamicNull
System.Int32 1104
System.String 1104,1108
So i cant use the same foreach code to retrive the id of the single item because CurrentPage.alias returns an Int32 instead of string in case of only one item attached to MNTP
Multinode treepicker strange behaviour Umbraco 7
Hi
on an umbraco7 site i have a document type (say "news") with a property (say "banner") of "MultiNode TreePicker"
In a partial view (/view/partial) that inherits from Umbraco.Web.Mvc.UmbracoTemplatePage i have the following code snippet:
and this is the output:
Umbraco.Core.Dynamics.DynamicNull
System.Int32 1104
System.String 1104,1108
So i cant use the same foreach code to retrive the id of the single item because CurrentPage.alias returns an Int32 instead of string in case of only one item attached to MNTP
any suggestion or i must be use .ToString() to force the cast from Int32 to String in case of only one item?
Hi Alessandro,
Yes, I think that is a bug and I'l report it as such unless you have already?
This would be my suggested snippet for MNTP in v7 using Dynamics:
Jeavon
Thanks Jeavon i don't report it already. Meantime, thanks for the suggested snippet
No worries, issue created here
is working on a reply...