our-user-include
our-user-include and our-user-exclude go on any element. They show or hide the element and its children depending on the user groups of the Umbraco backoffice user who’s logged in. Give them a comma-separated list of user group aliases.
<div our-user-include="admin">Only users in the Administrators group see this.</div><div our-user-include="admin,editor">Only users in the Administrators or Editors group see this.</div><div our-user-include="*">Only logged-in backoffice users see this.</div><div our-user-include="?">Only visitors who aren't logged in to the backoffice see this.</div>
<div our-user-exclude="editor">Everyone except Editors sees this (including visitors who aren't logged in).</div><div our-user-exclude="?">Everyone except visitors who aren't logged in to the backoffice sees this.</div><div our-user-exclude="*">Everyone except logged-in backoffice users sees this.</div>Special groups
Section titled “Special groups”| Value | Means |
|---|---|
* |
Any logged-in backoffice user. |
? |
Anyone who isn’t logged in to the backoffice. |
Good to know
Section titled “Good to know”our-user-includeshows the element when the user is in any of the groups.our-user-excludehides the element when the user is in any of the groups.- Use the group’s alias (such as
admin,editororwriter), not its name. - For website members rather than backoffice users, use
our-member-include.