Please tell me if there is something wrong with this line of code:
var pages = App.WorkWith().Pages().ThatArePublished().Where(p => p.GetPageData().Visible).Get().ToList();
I am trying to get all visible pages, because I believe the .ThatArePublished() method in my version of Sitefinity doesn't work correctly, as it is pulling in pages that are not published. This is a work around I discovered on these forums, but am having trouble implementing it.
Am I doing something wrong here? All my function does is return the page variable, and parses it from there. I have it tracked down to this very line of code. Any help would be greatly appreciated! Thank you.