Copied to clipboard

Flag this post as spam?

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


  • Joshua Walsh 30 posts 151 karma points
    Jun 12, 2015 @ 06:29
    Joshua Walsh
    0

    CurrentPage.Children returns unpublished children

    Hi,

    I'm using Umbraco 7.2.1.

    I have the following code:

    @foreach (var item in @CurrentPage.Children.Where("Visible"))
    {
        <div class="cell">
            <a class="pageListing" href="@item.Url">
                @item.Name
            </a>
        </div>
    }
    

    For some reason it is listing both published AND unpublished pages. I believe this is erroneous behaviour, how can I fix it?

    EDIT: Turns out it wasn't listing all unpublished pages, only one. I deleted the page and the issue has disappeared, I'm still confused as to why it happened in the first place though.

  • Ifrahim Rasool 28 posts 84 karma points
    Jun 15, 2015 @ 15:57
    Ifrahim Rasool
    0

    Must be cache

Please Sign in or register to post replies

Write your reply to:

Draft