Hide page - conditional logic

Hi, what is the best way to prevent the page from being displayed to non-logged in users? I know how to hide the menu item, but when the user knows the address of the link and enters it manually, I want to prevent access to the page and maybe show some access/error page… Thanx

Hi @pesiiin,

Welcome to the community! :slight_smile:

I would suggest setting a user condition on the template so that unless an admin user is logged in, the website won’t display.

Be sure to check out our docs for more information on conditions: https://docs.cwicly.com/interactions/visibility-conditions/themer#user-role

As a side note, a non-logged in user condition is urgently needed and will be available as soon as possible. Please bear with us in the meantime.

Hi, it’s a published page, not a template. So do I have to create a default template for this one page?

Or maybe make two blocks on that page and use block visibility conditions ?

Maybe it’s worth to check out Fragments.

1 Like