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
Hello there! I am having difficulties with displaying avatars assigned to the members.
<div class="coaches-carousel"> @if (coachesList.Count() > 0) { foreach (var coach in coachesList.Where(itm => itm.GetValue<bool>("wwunavailable") == false)) { if (coach.GetValue<string>("wwavatar").IsNumeric()) { mediaItemId = Convert.ToInt32(coach.GetValue<string>("wwavatar")); } else if (!string.IsNullOrEmpty(coach.GetValue<string>("wwavatar"))) { mediaItemId = coach.GetValue<string>("wwavatar").GetIdByUdi(); } <div class="coaches-carousel-item"> <a href="#"> <img src="@Umbraco.TypedMedia(mediaItemId).GetCropUrl("coach")" alt="@coach.Name" /> </a> </div> } } </div>
Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: mediaItem
Any idea how I can display them?
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.
Continue discussion
Problem getting avatars from members/Value cannot be null - mediaItem.
Hello there! I am having difficulties with displaying avatars assigned to the members.
Any idea how I can display them?
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.