I am not sure if this is a normal behavior or not.
Basically I am retrieving a list of top level pages via code using something like:
var topLevelPages = manager
.Where(p => p.Parent.Title == "Pages")
.OrderBy(o => o.Ordinal);
The problem in not in the code but on the recycle bin.
I had a list of pages on the CMS market "show in the menu". The snippet above (with an if statement) is picking everything fine.
I deleted a top level page (was a group page) and I could still see the page listed. (The code was still picking the page even though I delete it).
In order to completely remove the page from being displayed I had to remove it from the bin.
I suppose the code should not picks up things from the bin?
Hope this makes sense