Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Hi! Are the pages protected by access rights? Then they should be excluded if you use the FindPagesWithCriteria method and not FindAllPagesWithCriteria. To make sure that the call is made as an anonymous user you can try this code:
IPrincipal oldPrincipal = EPiServer.Security.PrincipalInfo.CurrentPrincipal; EPiServer.Security.PrincipalInfo.CurrentPrincipal = EPiServer.Security.PrincipalInfo.AnonymousPrincipal; // Make the call to FindPagesWithCriteria here ... // Go back to the original principal. EPiServer.Security.PrincipalInfo.CurrentPrincipal = oldPrincipal;
Hi,
How is it done to exclude URLS from a search when using PropertyCriteria. For example I need to exclude pages under a Member area from appearing in a sitemap.
I am using Episerver 8 but we are using PropertyCriteria.
Thanks
Jon