Is there a way to check if a page is protected (restirct public access)
Hi,
We're currently looping through a lot of pages for our custom navigation. We are planing to show locked pages on the navigation, then users must sign into view them.
Is there a way to check if a page has been restricted from public view? I.e. A user must login to see it?
We'd like to show an icon on the template if that is the case.
Assuming that your using a supported version of Umbraco, V10 or higher, you can use the MemberManager to help determine this.
You can inject the manager into your view(s) or helper class and should be able to determine if a page is restricted by using any of these, depending on your needs:
Is there a way to check if a page is protected (restirct public access)
Hi,
We're currently looping through a lot of pages for our custom navigation. We are planing to show locked pages on the navigation, then users must sign into view them.
Is there a way to check if a page has been restricted from public view? I.e. A user must login to see it?
We'd like to show an icon on the template if that is the case.
Any ideas?
Thanks
Assuming that your using a supported version of Umbraco, V10 or higher, you can use the MemberManager to help determine this.
You can inject the manager into your view(s) or helper class and should be able to determine if a page is restricted by using any of these, depending on your needs:
is working on a reply...