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
Anyone knows how to display OrderByDescending according to the latest media folder updated?
I have the following code in my cshtml file but want to orderBy latest UpdateDate
if(docFolder.ChildCount > 0){ var file = ""; var d = umbraco.library.DateDiff(docFolder.CreateDateTime.ToString("s"), Model.UpdateDate.ToString("s"), "m"); foreach (dynamic doc in docFolder.GetChildMedia().OrderByDescending(x=>x.CreateDateTime).Where(y=>y.ContentType.Alias =="File").Take(1)) { <strong>@doc.Parent.Text</strong> @doc}
Sorry this is what i want to achieve
var d = umbraco.library.DateDiff(docFolder.CreateDateTime.ToString("s"), docFolder.UpdateDate.ToString("s"), "m");
foreach (dynamic doc in docFolder.GetChildMedia().OrderByDescending(x=>x.d).Where(y=>y.ContentType.Alias =="File").Take(1))
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
OrderBy UpdateDate in Media
Anyone knows how to display OrderByDescending according to the latest media folder updated?
I have the following code in my cshtml file but want to orderBy latest UpdateDate
Sorry this is what i want to achieve
is working on a reply...