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, does anyone know if it's possible to render a grid property in a Multinode Tree Picker? I'm trying to do it within a partial view.
Umbraco 8.9.2
I get this error:'System.Web.HtmlString' does not contain a definition for 'sections'
'System.Web.HtmlString' does not contain a definition for 'sections'
Partial view:
@inherits Umbraco.Web.Mvc.UmbracoViewPage @using ContentModels = Umbraco.Web.PublishedModels; @using Umbraco.Web.Models; <div class="links-info-blocks"> <div class="wmcads-col-1"> <h2>@Model.Value("pageLinksTitle")</h2> </div> <div class="link-info-blocks"> @{ var mntpLinks = Model.Value<IEnumerable<IPublishedContent>>("mntpLinks"); } @foreach (var item in mntpLinks) { <div class="col-1"> <div class="link-info-block"> <h3>@item.Name</h3> @if (item.Value("copy") != null) { @Html.GetGridHtml(item.GetProperty("copy")); } <div class="text-right"> <a class="btn-secondary" href="@item.Url">Read more</a> </div> </div> </div> } </div> </div>
I think you have an extra closing bracket in there.
Thanks but that's not the issue. I have a lot more code than above, I just removed some so it's easier to read on the forum.
Hi Nathan.
Maybe this works
@Html.GetGridHtml(item, "copy", "gridTemplateName")
I thought I'd tried that but obviously not. That's worked perfectly. Thanks for your help
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Render grid in MNTP
Hi, does anyone know if it's possible to render a grid property in a Multinode Tree Picker? I'm trying to do it within a partial view.
Umbraco 8.9.2
I get this error:
'System.Web.HtmlString' does not contain a definition for 'sections'
Partial view:
I think you have an extra closing bracket in there.
Thanks but that's not the issue. I have a lot more code than above, I just removed some so it's easier to read on the forum.
Hi Nathan.
Maybe this works
I thought I'd tried that but obviously not. That's worked perfectly. Thanks for your help
is working on a reply...