@foreach (var article in pageOfArticles)
{<img class="img-fluid"src="@(article.ArticleImage.Url)" alt="sa" />
instead!
Everything inside the @() brackets is written out to the template, so you were seeing the Media Object Class name written out, but you want the .Url property of that object to be written out, and so the .Url bit needs to be inside the @() brackets
cant get image from a class
@using CleanBlog.Core.Helpers
@inherits UmbracoViewPage
@{ var articleList = Model.Root().Descendants
@if (articles != null && articles.Any()) {
}
i can reach other props like article.DateTime or article.AuthorName but src looks like this src="Umbraco.Web.PublishedModels.Image().Url"
Hi Slatuk
Try
instead!
Everything inside the @() brackets is written out to the template, so you were seeing the Media Object Class name written out, but you want the .Url property of that object to be written out, and so the .Url bit needs to be inside the @() brackets
regards
Marc
thank you sir
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.