Search code examples
content-management-systemorchardcmsorchardcms-1.8orchard-modules

Combine layer rule with user role in orchard cms


Recently I started working on Orchard CMS. I am able to create a layer with "Layer Rule" like "not url '~/some-page-url'". What my question is "is it possible to combine Layer Rule with User Role. I tried like this 'authenticated(admin)' but it is not working as i expected.

What i did: Created a simple page with title "Test Page" and created a Navigation say "Only Admin". In Widget page i choose "Authenticated Layer" and "edit" in layer rule, i changed "authenticated" to "authenticated(admin)".

Expected: Only when ever admin login the menu which i ve created is to be shown in the front end. and none other user login menu has to be hide.

"Im in the correct way or not can some one guide me in the right path." PS:Sorry for my english.


Solution

  • This functionality is not supported out of the box but there is a module on the gallery that offers it:

    Role Layer Rule