@{
var partnerReviews = CurrentPage.Site().FirstChild("generalDataType").Children("partnersReview").Where("Visible");
}
@foreach(var item in partnerReviews){
<div class="col-lg-4">
<div class="bubble">
@item.partnerReviewMessage
</div>
<div class="comments-avatar">
<a href="" class="pull-left">
<img alt="image" src="./img/avatar3.jpg">
<img src="@Umbraco.TypedMedia(Convert.ToInt32("@item.partnerImage").ToString()).Url" />
</a>
<div class="media-body">
<div class="commens-name">
@item.partnerName
</div>
<small class="text-muted">@item.partnerCompanyName</small>
</div>
</div>
</div>
}
I have created a partial page to render all the review message created by a user under partner review. Each message contains review message, partner name, partner company name and image of partner.I have used media picker to upload or select an image.
I have created above loop to render all the message on my page. All the things except image rendering perfectly. Can anybody help me in getting the URL of images from media library?. @Umbraco.TypedMedia(Convert.ToInt32("@item.partnerImage").ToString()).Url
What's the problem with this line I'm not getting.It is working correctly in a template and not with a partial page. What may be the reason?