SitemapXml returns "unpublished" sites aswell..

Topics: General
Mar 13, 2011 at 7:42 PM


Im trying to build my very own menu/navigation..and Im currently useing the SitemapXml function as the XML source..but the thing is that it also seems to return pages thats not published..and I cant find any attributes within the XML telling me that a page isn't or is there any other way around this?

(I dont want to use the default menu since it includes some extra Css that I never will use..)


Thanks in advance!

Mar 13, 2011 at 8:57 PM

If you are rendering your menu using an XSLT Function, check the 'Debug' feature on the Setting tab - here you can simulate either a 'Unpublished' view (what content administrators see) or a 'Published' view (what visitors on your site will see). 

You don't have to filter out pages that are not published - Composite C1 take care of this for you. I.e. when a visitor view a page, yout XSLT is handed a sitemap that only contains published pages. When a content administrator previews pages inside the C1 Console, they get to see the unpublished parts also.

In short; this just works - you don't have to spend time on it :)