Cannot install Nested Content Editor in v12 (upgraded from 7)
m
I am trying to install the Nested Content Property Editor in a U12 site (which was previously upgraded from v6 or 7, c#) - Nuget cannot install it due to a lucene dependancy, I see now that the github version is also archived, which leads me to believe this is the error. How can I install the property as it's not available in my U12 installation?
h
from a post on the forums Nested Content has been deprecated in Umbraco 11. You can still use it though, but you need to enable deprecated property editors in config. You really shouldn't though. You can use Block List instead - Nested Content is going to be removed from Umbraco in version 13 (ETA Q4 2023).
m
Thank you, so just to confirm, what I am after here is to create a document type for a timeline (so I need to give a year, name,text), but want the content editor to "add more" - I will in the template take the data (object / array) and then dynamically build the timeline
will this be suffice or is there possibly another / better solution?
I have already created the documenttype with the various fields, I just dont know how to set it to allow for multiple items in the same document type if that makes sense?
h
You should be able to use a blocklist I think for this
Create an element doc type that has your year/name/text fields, then create a blocklist data type which uses the element as it's only block. Then add your blocklist to the document template
m
let me give it a go, thank you for your help
almost went down the rabbit hole
I feel like a noob here, but I am not able to get access to the timelineItems in my razor code, if I watch node, I can see a "TimelineItems" with 2, I am assigning it using var timelineItems = node.Value<IEnumerable>("TimelineItems");
but timelineItems remains null
I am not sure how to access the content of TimeLineItems, I am getting contents of node using var node = Umbraco.Content(nodeId);
h
not sure off the top of my head, but should probably be a BlockListItem, will need to dig out some code to check
m
I think I have it, took a while but man case sensitivity 😄
I should stop looking at the watch and rather the alias created 😄
j
Use blocklist and don't use nested content
You probably want to look at how to use BlockListItem in .NET. They way you are doing it, is making life very hard for yourself. In Razor, you will probably need to debug, look at the type and cast to that type so it maps properly 🙂
m
Use modelsBuilder for stronly typed access to those props.. to avoid you struggles with caseSensitivity/typos etc..
u
@huwred FYI, Nested Content will still exist in V13 and is now scheduled to be removed in V14
2 Views