Usage


  1. Settings → Fields → New field, create a Password field, then add it to the field layouts you want to protect.
  2. Set a password on an element to protect it. Clear it to make it public again.

Tip

On Craft 6, consider putting the field in a sidebar tab. A password controls who can see the element rather than being part of its content, so it sits naturally beside the status and other meta fields. In the field layout designer, click New tab under Sidebar Tabs and add the Password field to it. Each entry type has its own layout, so you choose this per entry type.

Anonymous visitors get the unlock screen. Elements sharing the same password unlock together.

To flag protected elements in your own templates, test the field for a value: set is truthy, empty is null:

Twig
{% if entry.<handle> %}🔒{% endif %}

This never reveals or decrypts the password, it only checks whether one is set.