New Content picker format, how to retrieve the content ?
How to get an IPublishedContent from such data ?
umb://document/dbdab1d2839d4b9a9b793b7186757918 which is how are stored the values in the new content pickers.
content.GetValue<IPublishedContent>("field") is not working, at least not in the publishing events.
New Content picker format, how to retrieve the content ?
How to get an IPublishedContent from such data ? umb://document/dbdab1d2839d4b9a9b793b7186757918 which is how are stored the values in the new content pickers.
content.GetValue<IPublishedContent>("field") is not working, at least not in the publishing events.
Hi Laurent
You have to get IPublishedContent, like that right now, because of "Property Value Converters" is part of core after version 7.6 https://our.umbraco.org/documentation/Getting-Started/Setup/Upgrading/760-breaking-changes#property-value-converters-u4-7318
Or you can disable "Property Value Converters" and use old way with ids.
Thanks,
Alex
The Property Value Converters are disabled, and actually it's not an issue as long there is an active umbracoContext I guess.
But in publishing events I can't get directly the items without some extra code to parse the uid and retrieve them manually.
Hi,
Here is some code which I used to get data from a content picker.
node is also an IPublishedContent object.
Kind Regards
David
is working on a reply...