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
The code below displays 5 items rather than 6 that I need. When I change this to 7 it displays 6 so it displays one less than specified. Just can not work out why it is doing this. Does anyone have any ideas.
var selection = Umbraco.Content(Guid.Parse("800fd6f3-d5c1-498b-9e81-0dac67a85d7d"))
.Where(x => x.IsVisible())
.OrderByDescending(x => x.Value<DateTime>("pressReleaseDate"))
@foreach (var item in selection)
var typedMediaPickerSingle = item.Value<IPublishedContent>("pressReleasehomeimage");
if (typedMediaPickerSingle != null)
<div class="newsimage"><img src="@typedMediaPickerSingle.Url" /></div>
<h7> @(item.Value<DateTime>("pressReleaseDate").ToString("dddd, MMMM dd, yyyy"))</h7>
<div class="newsfooter"><img src="umbraco/assets/img/pressimage.png"></div>
Hi, Can you confirm that non of the items of your selection don't have a null "pressReleasehomeimage" ?
All items have images.
Hmm not sure, maybe you can try also to amend the where with that
.Where(x => x.IsVisible() && x.Value<IPublishedContent>("pressReleasehomeimage") != null)
Just to make sure isn't any image. Can't see anything else.. :/
We found that one of the images was formatted in cmyk and not rgb. When we made it rgb it worked.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted