This article for developers helps you get more out of Secure Zones, as you can output basic information about the Current User dynamically.
You have installed the Secure Zones Module
You have added a User Sign Up Form
A User has logged in
When a User signs up or logs into your site, we store basic information about that user. You can use this to make the page respond uniquely to that user.
Outputting the following liquid on the page shows the full range of fields available:{{context.current_user | json}}
You can traverse through the fields in the object and output them with dot notation. E.g. {{context.current_user.first_name}}
This will output the current user's first name, so you can say hello.
You could also use an if statement to run logic using this. E.g. If I want to say hello to all users with a siteglide email address:
How to create a Secure Zone using GraphQL via the CLI
Secure Zones are simply a Model object within Siteglide, with this in mind, we can very easily create Secure Zones via the CLI using GraphQL.
You have installed the Secure Zone module on the instance
You have setup CLI and connected to your Site
You know how to use the GraphiQL editor
Below is the GraphQL mutation that is used to create a Secure Zone from Siteglide Admin.
We simply pass it the name for the Secure Zone within the query variables.
After running the mutation, you will see an ID returned in the output window of the GraphiQL editor. The ID returning means that the mutation was successful and your new Secure Zone can now be used.
Note
If you already have Admin open you will need to refresh it to see the new Secure Zone.