hi i'm using block list i was doing nested content with it in umbraco 10 it was fine. now using umbraco 11 having issues with when i' using ITEM.CONTENT
do you know how i can fix this please
var rowItem = (AccordionItem)item.Content;
@inherits UmbracoViewPage<BlockGridItem<AccordionRow>>
@{
var rowAccordion = (AccordionRow)Model.Content;
if (rowAccordion.AccordionDetails == null || !rowAccordion.AccordionDetails.Any()) return;
var accordionId = "accordion-" + rowAccordion.Key;
}
<div cite="row">
<div class="container">
<div id="@accordionId">
@{
var index = 0;
foreach (var item in rowAccordion.AccordionDetails)
{
var rowItem = (AccordionItem)item.Content;
var show = index == 0;
var headingId = accordionId + "heading-" + index;
var collapseId = accordionId + "collapse-" + index;
<div class="card">
<div class="card-header" id="@headingId" style="margin-left: 0!important; margin-right: 0!important">
<h5 class="mb-0">
<button class="btn btn-link" data-toggle="collapse" data-target="@collapseId" aria-expanded="@show" aria-controls="@collapseId">
@rowItem.Title
</button>
</h5>
</div>
<div id="collapse-@index" class="collapse @(show ? "show" : null)" aria-labelledby="@headingId" data-parent="@accordionId">
<div class=" card-body">
@rowItem.Content
</div>
</div>
</div>
index++;
}
}
</div>
</div>
</div>
'char' does not contain a definition for 'Content' and no accessible extension method 'Content' accepting a first argument of type 'char' could be found (are you missing a using directive or an assembly reference?)
Nested Content in newer versions of umbraco
what do you use instead of nestedContent in the newer versions of umbraco
since it does not exist in 11.1.0 but it does in 8.14
im sitting and updating the program
Hi,
I would recommend to use Block List.
If you want it to work more like Nested Content you can choose inline editing mode on the datatype.
hi i'm using block list i was doing nested content with it in umbraco 10 it was fine. now using umbraco 11 having issues with when i' using ITEM.CONTENT
do you know how i can fix this please
Is that your exact code? Yo have this at the top, but item is not defined there
It would also help if you could provide the error you are getting.
Oh sorry man here is the error message
'char' does not contain a definition for 'Content' and no accessible extension method 'Content' accepting a first argument of type 'char' could be found (are you missing a using directive or an assembly reference?)
hi Garðar Þorsteinsson can you please help me out with this error kinder stuck.
Hi Brygger92,
Did you manage to solve your issue in the end?
Nik
is working on a reply...