Secure Zones - Landing page

I’d like to setup a secure zone where a page’s content is only available after a user logs in with an on-page login form.

I’ve set up a secure zone (lets call it SECUREZONE1) and set a landing page within its settings (LANDINGPAGE).

I’ve also setup a page (LOGINPAGE) with a secure zone login form. Ive added this form in the CMS by simply adding Components > Secure Zone > Login Form to the Page. This appears to be a general secure zone login form without any statement that its for logging into SECUREZONE1 specifically)

If I use LOGINPAGE to log in, it doesn’t land me on the LANDINGPAGE url set in the SECUREZONE1 settings. It just remains showing the login form with the url *?login=success. I can then manually navigate to the secured LANDINGPAGE and the content is available.

Alternatively If I navigate to the LANDINGPAGE whilst not logged in there is no form to log in and it says unauthorised on the page. If i add a form to this page it does not show on page.

Q: Is there a way to make the login form specific to SECUREZONE1 instead of being general. I suspect if I can, the system will pick up the Landing page setting and land the user there.

Or am I just missing something else here re secure zones? Struggling to find anything in the the Treepl Docs or Forum.

Hi @Reagan_Vautier.
I think the user will get logged into all zones they are subscribed to upon successful login. So there’s no specific login forms as far as I’m aware.

Regarding the landing page, again since no specific login form landing pages don’t really apply as much - probably just a BC alignment thing and for future use.
However, you can setup the form to redirect to a specific page, and additionally, once they are logged in you could dynamically redirect them based on their zone subscription/s using the {{request.currentMember}} object:
https://docs.treepl.co/documentation_group/liquid/request-object#secCurrentMember

Some more forum discussion on the login form redirection here:
Secure Zones logins

The login form should definitely display on the ‘UNAUTHORISED’ page if you’ve added it there.
Just to confirm, this is the 401 system page.

1 Like