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
how to get me this script to only write the 3 latest news articles out
{
@foreach (var item in Model.Children.Where("umbracoNaviHide != true").OrderBy("UpdateDate"))
var bodyitemhtml = @Library.StripHtml(@item.bodyText);
<li><a href="@item.Url"><span>@item.Name</span><br>
<span>@Library.Truncate(bodyitemhtml,150)</span>
<em>Publiceret: @umbraco.library.LongDate(@item.UpdateDate.ToString(), true, " - ")</em></a>
</li>
}
Hi Brian,
Change this
to
@foreach (var item in Model.Children.Where("umbracoNaviHide != true").OrderBy("UpdateDate").Take(3))
super
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Razor 3 latest news articles
how to get me this script to only write the 3 latest news articles out
{
@foreach (var item in Model.Children.Where("umbracoNaviHide != true").OrderBy("UpdateDate"))
{
var bodyitemhtml = @Library.StripHtml(@item.bodyText);
<li><a href="@item.Url"><span>@item.Name</span><br>
<span>@Library.Truncate(bodyitemhtml,150)</span>
<em>Publiceret: @umbraco.library.LongDate(@item.UpdateDate.ToString(), true, " - ")</em></a>
</li>
}
}
Hi Brian,
Change this
to
super
is working on a reply...