How do I update a partial view with a list of imag...
# help-with-umbraco
d
I have a footer that is a partial view, and I want to add a few images into the footer. I have added a Multiple Image Media Picker to Document Types "Start Page" for the editors, and added the images to Media blob. But here is where I get stuck, do I need to code the change in both Templates > Start Page AND in Partial Views Footer.cshtml ? Looking at Templates > Start Page (/Views/StartPage.cshtml) there is no direct ref to the footer, just a forEach that will get the a list of items from the Document Type? And how do I add all the images to the Footer.cshtml? I know to loop through them, but accessing them specifically is like, "huh?" to me. Footer.cshtml ´@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage @using Umbraco.Cms.Core.Models @{ var root = Model.Root(); IEnumerable? footerAdditionalLogos = new List(); if (root != null) { footerAdditionalLogos = root.Value<IEnumerable>("logos"); } [...] @if (footerAdditionalLogos != null) { @foreach (var item in footerAdditionalLogos) { } } ´ I see the div in the browser devtools inspector, but I'm not getting the images. I have also tried using Model, but that errors on Model iteself, and also on 'root'. @foreach (var logoItem in Model.logos) Send help. Pls.
10 Views