Secure Zones

 Last Edited: Sep 26, 2019

Syntax

Log In 

{%- include 'login_form', layout: 'default', redirect: '/' -%}

Log In / Sign Up

{%- include 'form', id: '1', layout: 'default' -%}

This is the same syntax for inserting a custom Form, where the id parameter should be the id of your Form.

See the section below "Creating a Sign Up Form" to learn more. Once you have created a Form, Toolbox can dynamically fill in the ID for you. 

Log Out

{%- include 'logout_button', layout: 'default' -%}

Liquid Tags

Field Name
Liquid Tag
Description

is_logged_in

{{context.exports.is_logged_in.data}}

true/false. Used to determine if the user is signed in or not

Creating a Secure Zone

Once installed, you can find Secure Zones within Modules, on the left-hand menu of your Admin.

To create a new Secure Zone, click the + Create new Secure Zone button along the top right of the Secure Zones list page. Simply input a name for your Zone and click save.

Creating a Sign Up Form

For maximum flexibility, you can assign any of your custom Forms to be a Sign Up Form for a Secure Zone.

When creating or editing a Form, click on the "Secure Zones" tab to select which Zones you would like the Form to allow sign up for. When you're done, hit the save button.

Once a Secure Zone has been added to a Form, a password field is added.

If the User has already Signed Up- the same Form can be used to log them in. 

The final step is to create a registration Page and use Toolbox to output the Sign Up Form.

Adding Pages to Secure Zones

You can add any page to a Secure Zone by navigating to your chosen page, expanding the Secure Zones accordion and selecting the relevant Secure Zones. When you're done, hit the save button.

When you try to view the page, you will find it resolves to unauthorised access (404), this is a default system page.