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 have usps nested-content property on-page and I want to add a new item to usps list from backend
usps
The item property name is usp
usp
Thanks in advance.
Hi Davit,
Something like:
var list = new List<Dictionary<string, string>>(); Guid guid1 = Guid.NewGuid(); liste.Add(new Dictionary<string, string>(){ {"key","@guid1"}, {"name","Some name"}, {"ncContentTypeAlias","usp"}, {"Property in NestedContent","Some Text"}, }); node.SetValue("usps", JsonConvert.SerializeObject(list));
Thanks,
Alex
Hi Alex
I did it your way and it works fine when adding and in the backoffice the values are added, but when I retrieve the value to show it on my website I got this error can you help me to solve this error?
Hi Alex, I am new to Umbraco. How do I get node in your example. Currently i am using umbraco 8.8 . Can you please suggest me. .
Alex thank you very much it works perfectly.
Thanks David
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
How can I add an item to nested-content (IEnumerable<IPublishedElement>>("usps")) programmatically?
I have
usps
nested-content property on-page and I want to add a new item tousps
list from backendThe item property name is
usp
Thanks in advance.
Hi Davit,
Something like:
Thanks,
Alex
Hi Alex
I did it your way and it works fine when adding and in the backoffice the values are added, but when I retrieve the value to show it on my website I got this error
can you help me to solve this error?
Hi Alex, I am new to Umbraco. How do I get node in your example. Currently i am using umbraco 8.8 . Can you please suggest me. .
Alex thank you very much it works perfectly.
Thanks David
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.