Unable to use Secure Zone Liquid Data Sets

Using {{request.currentmember.securezones}} I am able to get the following data

“id”: 1,
“name”: “Prep Page”,
“landingpageid”: 1856,
“createddatetime”: “2020-01-25T12:56:53.823”,
“updateddatetime”: “2020-01-25T12:56:53.823”,
“expirydatetime”: “9999-12-31T06:00:00”,
“ExpiryOption”: null,
“ExpiryAfter”: null,
“AccessType”: 0,
“Plans”: null,
“CountPaidSubscribers”: 0

However that is all the farther I can go. If I try to use {{request.currentmember.securezones.id}} or any of the other data sets I get no data displayed on the page.


Hi @Rhatch.
This is because securezones is an array object, so generally you don’t directly access it like this and instead would loop through the array items.
If however, you know there will only ever be the one item in this array, or you only want the first one, you can simply do this:


(The [0] references the array item index)

If there are multiple items (secure zones), you’d loop through them like:

{% for sz in request.currentmember.securezones %}
{% endfor %}

Thanks Adam! That is what I needed. Using it to restrict update data based on what secure zone is logged in.