I've media picker in Umbraco 8 and I want to display image in my cshtml page.
@inherits Umbraco.Web.Mvc.UmbracoViewPage
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
<body>
<section class="section">
<div class="page-header-box">
<img src="images/Leadership.png" />
</div>
<div class="ld-content-box gradientbackground">
<div class="inner-container">
<h3 class="ip-title">Leadership</h3>
<ul class="aboutus-leadership-listing">
@foreach (var childPage in Model.Children())
{
<li data-aos="fade-up">
<div class="abll-image-box">
@{
var leaderImage = childPage.Value<IPublishedContent>("leaderImage");
}
But I am getting error :
The type or namespace name 'IPublishedContent' could not be found (are you missing a using directive or an assembly reference?)
I don't it is issue because of Umbraco V8 or is there anything missing?