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
Hi all,
I have a element type which includes a Grid property like shown in the screenshot below:
With a nested DataType property I implemented this element in a template like so:
In the template, I grab the content of this item.
var steps = Model.Value<IEnumerable<IPublishedElement>>("step", fallback: Fallback.ToAncestors);
Then I loop over it:
foreach (var step in steps) { var stepDetailsAccordionId = "accordion-item" + Guid.NewGuid().ToString(); var stepIcon = step.Value<IPublishedContent>("stepIcon"); var stepHeader = Html.Raw(step.Value("stepHeader").ToString()); var stepDetailsHead = Html.Raw(step.Value("stepDetailsHead").ToString()); var stepDetailsGrid = step.Value<IEnumerable<IPublishedElement>>("stepDetailsGrid"); @* Html.GetGridHtml(Umbraco.AssignedContentItem, "stepDetailsGrid", "Bootstrap3-Fluid");*@ var stepDetailsEnd = Html.Raw(step.Value("stepDetailsEnd").ToString());
Now I don't know how to access this item.
When i try to loop over it:
foreach (var stepGrid in stepDetailsGrid) { Html.GetGridHtml(Umbraco.AssignedContentItem, "grid", "Bootstrap3-Fluid"); }
I get a "NullReferenceException" error for the "stepDetailsGrid"
Ok found the answer.
here it is:
https://our.umbraco.com/packages/backoffice-extensions/nested-content/nested-content-feedback/88837-how-to-render-grid-layout-in-nested-content#comment-280930
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
Access nested Grid content
Hi all,
I have a element type which includes a Grid property like shown in the screenshot below:
With a nested DataType property I implemented this element in a template like so:
In the template, I grab the content of this item.
Then I loop over it:
Now I don't know how to access this item.
When i try to loop over it:
I get a "NullReferenceException" error for the "stepDetailsGrid"
Ok found the answer.
here it is:
https://our.umbraco.com/packages/backoffice-extensions/nested-content/nested-content-feedback/88837-how-to-render-grid-layout-in-nested-content#comment-280930
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.