November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
// Will fetch the page even if the user doesn't have priviliges to se the page
// Will throw an Exception if page with ID=3 doesn't exist.
EPiServer.Core.PageData page = EPiServer.Global.EPDataFactory.GetPage(new EPiServer.Core.PageReference(3), EPiServer.Security.AccessControlList.NoAccess);
// Check if page is published
if (page.CheckPublishedStatus(EPiServer.Core.PagePublishedStatus.Published))
{
// Do something
}
// Check if user has access to read the page
if (page.ACL.QueryDistinctAccess(EPiServer.Security.AccessLevel.Read))
{
// Do something
}
I use above functions alot to avoid exceptions in my code.
Regards,
/HAXEN