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
I want exclude dinamicly current page from list. See image below: http://prntscr.com/l0y06s This is my current code:
<main class="newsItem"> <section class="container"> <div class="row"> <div class="col-sm-4"> @{ var image = Model.Content.GetPropertyValue<IPublishedContent>("newsImage"); if (image != null) { <img class="img-responsive center-block" src="@image.Url" /> } } @{ var selection = Model.Content.Site().FirstChild("news").Children() .Where(x => x.IsVisible()) .OrderBy("UpdateDate desc"); } <ul> @foreach(var item in selection){ <li> <a href="@item.Url">@item.Name</a> </li> } </ul> </div> <div class="col-sm-8"> <h1 class="text-primary"> <strong>@Umbraco.Field("newsTitle") </strong> </h1> <h3> <strong>@Umbraco.Field("newsSubtitle")</strong> </h3> <p> @Umbraco.Field("newsBody") </p> </div> </div> </section> </main>
Comment author was deleted
Try updating your .Where(x => x.IsVisible()) by also checking in the x.Id != Model.Content.Id
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Exclude current page from list
I want exclude dinamicly current page from list. See image below: http://prntscr.com/l0y06s This is my current code:
Comment author was deleted
Try updating your .Where(x => x.IsVisible()) by also checking in the x.Id != Model.Content.Id
is working on a reply...