Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Joe Codino 25 posts 125 karma points
    Jan 15, 2016 @ 00:52
    Joe Codino
    0

    Blog posts by publish date

    I can't find a solution for this, I hope someone can point me to the right direction. Basically I have a website with latest 3 blog posts in home page. I use something like this

     foreach (var post in Umbraco.TypedContent(1234).Children.Where(o => o.IsDraft == false).OrderByDescending(o => o.UpdateDate).Take(3)){ ... }
    

    but it also shows scheduled, unpublished, items. In the backoffice the scheduled items are "unpublished" and I correctly see them grayed out.

    I can't find any way to get the item status (published, unpublished or scheduled) or the release date.

    Hope you can help, Joe

  • Alex Skrypnyk 6162 posts 24132 karma points MVP 8x admin c-trib
    Jan 15, 2016 @ 13:37
    Alex Skrypnyk
    0

    Hi Joe,

    Umbraco.TypedContent should return only published nodes, so maybe something with publish status in admin ? Did you do republish ? What version of Umbraco ?

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft