How do I "lock" a page so that it's viewable only by certain people in my people database?


There are two ways you can go about "locking" a page:

Option 1 (recommended)

With this option, you can lock any page to be viewable by anyone marked as a member in your people database. All you need to do is go to the page settings options in your NationBuilder Control Panel for the page you want to lock, and set the Who can view this page? option to Members. You can read more about managing memberships in your Nation here:

Option 1 is recommended as it allows you to "lock" a page using NationBuilder's built-in features, however please note that anyone marked as a member in your NationBuilder database will be able to see any page restricted to members only (i.e. you cannot restrict a page based on what type of membership you assign a user).

Option 2

Option 2 involves making some page-level template edits, and requires an understanding of HTML and liquid code. This option allow you to "lock" a page so that it's viewable only by people whose profiles have a unique tag of your choosing. The instructions below apply for a basic page, but the same principle can be applied to any of NationBuilder's other page types as well (with some knowledge of HTML and liquid).

Step 1: Navigate to the page settings options for the page you want to lock. Set the page Status to unlisted. This will ensure that this page (and any subpages) are not crawlable by search engines, giving you an extra level of security).

Step 2: Set the Who can view this page? option to Logged in (also under page settings). This will make sure that any user must first be logged in to see the content of this page. Once you're done, don't forget to click "Save page".

Step 3: Click on the Template tab, and find the line of code that contains the {{ page.basic.content }} liquid variable. It should look like this:


Replace that line of code with the 5 lines of code seen here:


Be sure to replace the "YOUR TAG HERE" text with the tag you want to use to allow access to this page. For example, if you want anyone tagged with Stewardship Group to be able to see this page, your would replace "YOUR TAG HERE" with "Stewardship Group" in the example above. Please note that tags are case sensitive.

You can also customize the text that appears for anyone who does not have the appropriate tag. In the example above, anyone who does not have the appropriate tag will see the "You do not have access to this page" text. To customize this text, simply enter in your custom text between the two HTML paragraph tags ("<p>" and "</p>").

Step 4: Click the "Save and Publish" button


Be the first to comment

Please check your e-mail for a link to activate your account.