Restricted Access

Password-protect part of a website's frontend so only logged-in contacts can see it. Two pieces work together: a folder-level flag that marks a folder as restricted, and a shortcode that actually enforces the redirect on each protected page.

Mark the folder

Go to the folder you want to restrict, open Update Folder, and expand Website Properties. Check Restrict Access in Website to Authorized Users and click Submit.

Restrict Access in Website to Authorized Users checkbox

See Update Folder for the rest of that form's fields.

Enforce it on a page

Add the [contact_form_session] shortcode to the top of any page that needs to be protected:

[contact_form_session]

If there's no logged-in contact session, the visitor is redirected before the rest of the page renders.

Attribute Description
forward_to Where to redirect an unauthenticated visitor. Defaults to the website's login page if one is configured, otherwise /login.stml.
[contact_form_session forward_to="/login/"]

The redirect appends ?next_url= with the page the visitor was trying to reach, so your login page can send them back after they sign in.

Build the login page

  1. Add a page to hold the login form.
  2. Add the Contact Form Login shortcode to it, and point forward_to at wherever a signed-in visitor should land.