문제

In my umbraco project, i require values in the "last Edited" tab, inside C# code.

enter image description here

How can i get those values?

Please Help, Thanks.

도움이 되었습니까?

해결책

It's quite simple. Here's one way of doing it:

// Assure the query is done to the root node, in this case I was on the root controller.

var recentUpdatedNodes = Model.Content.DescendantsOrSelf().OrderByDescending(x => x.UpdateDate).Take(50);

foreach (var node in recentUpdatedNodes)
{
    @node.Name
    @node.Url
    @node.Id
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top