Block Visibility

How to configure conditional visibility rules on a block level

Membership

As soon as you have set up memberships, you can choose which user group you want a particular block to be visible to. This is configured through the "eye" icon next to the block name and has the following options:

  • All users (selected by default)

  • Logged in users

  • Non Logged in users

Accessing block visibility

If you switch the block visibility to Logged in users or to Non Logged in users, a padlock icon will start appearing on the block, as shown below, indicating that it's gated content with limited visibility.

Padlock icon indicating limited visibility

For example, the block visibility feature can be used to show a header with log in/sign up buttons to non logged in users and a different header without buttons to logged in users (discussed here). But that's just one case, and there can be many other cases when you need to display/hide a certain block from different user groups, thus having a different content for logged in and non logged in users.

Payment & Other Conditions

Apart from making the block accessible to a specific groups of users, you can also define other conditions including payment (e.g. users can access the block only after making a payment). Please, note that you can start configuring payment conditions only after connecting your Stripe account.

Use the Payment blocks to set up a checkout and start receiving payments.

Adding Conditions

Payment & Other Conditions can be set only if the block visibility is set to Logged in Users

First of all, from the dropdown at the top you should choose whether the user needs to meet any or all of the conditions defined below to be able to view the block.

All or any of the conditions

You can add as many conditions as required, and they'll be joined with OR (match any is selected) or AND (match all is selected).

"Match any" option selected

Now, let's add a condition using the Add condition button to see how it's configured. There are three fields in Condition Settings, so let's see how each of those works.

Condition Settings

Condition Settings

Select Attribute

First, you need to select the attribute for which you want to set a condition. There are the following options:

  • One-time Product

  • Subscription

  • Logged in User's Email

  • Logged in User's Email-domain

Select Attribute

The first two options are payment-related and are for selecting One-time products or Subscriptions created in your Stripe account. For instance, you can use this to provide access to a given block only to the users who have purchased a specific subscription.

The last two options are for defining a condition based on user's email address (e.g. demouser@softr.io) or user's email address domain (e.g. softr.io). This way, you can restrict the block visibility to a specific group of email addresses or email address domains.

Select condition

Here, the list of options differs based on the Attribute you've selected. For the payment-related attributes (One-time product and Subscription) the conditions are as follows:

  • is one of (the user has purchased at least one of the subscriptions/products selected in the Value field below);

  • is none of (the user hasn't purchased any of the selected values);

  • has all of (the user's purchases contain but are not limited to the selected values).

Payment-related conditions

For the email attributes (Logged in User's Email, Logged in User's Email-domain), you have these conditions:

  • is one of (corresponds to one of the added values);

  • is none of (doesn't correspond to any of the values added below).

Email-related conditions

Select Value

Finally, you need to add the values for which the defined condition should work. For One-time Product and Subscription attributes you should see a list of values based on what you have created on Stripe. You can select as many values as needed.

List of values

In the example provided below, a condition is defined so that all the users that have purchased the "Advanced JavaScript Course" product, have access to the block, which could be a List block with JavaScript video tutorials.

One-time Product condition defined

For email-related attributes, you can type in the values and have as many values as needed (type the email address or domain and hit Enter to add the value). In the below example, if the user's email matches any of the two emails added in the Value field, he/she will have access to the block.

Email address condition defined

That's it. You can add more conditions the same way to customize the visibility of your block according to your needs.