You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,24 @@ This tag helper element `<our-version>` prints out version number for a given As
209
209
<our-version="Our.Umbraco.TagHelpers" />
210
210
```
211
211
212
+
## `our-member-include` and `our-member-exclude`
213
+
This is a tag helper attribute that can be applied to any DOM element in the razor template or partial. It will show or hide its element and children on the page when passing a comma seperated string of member groups that the current logged in member for the exclude or include variants.
214
+
215
+
There are two special Member Groups you can use:
216
+
*`*` - All anonymous users
217
+
*`?` - All authenticated users
218
+
219
+
```cshtml
220
+
<div our-member-include="Staff">Only members of Staff Member Group will see this.</div>
221
+
<div our-member-include="Staff,Admins">Only members of Staff OR Admins member group will see this.</div>
222
+
<div our-member-include="*">Only logged in members will see this.</div>
223
+
<div our-member-include="?">Only anonymous members will see this.</div>
224
+
225
+
<div our-member-exclude="Staff">Only Staff members can't see this (Including anonymous).</div>
226
+
<div our-member-exclude="?">Everyone except Anonymous members will see this.</div>
227
+
<div our-member-exclude="*">Everyone except who is authenticated will see this.</div>
228
+
```
229
+
212
230
## Video 📺
213
231
[](https://www.youtube.com/watch?v=3fkDs0NwIE8)
0 commit comments