[Solved] Experience View: Show link only for a particular user group

How can I display a hyperlink for only one user group using handlebars in my view HTML? I tried the below but it doesn’t seem to quite work.

        {{#each experience.user.experienceGroups}}
          {{#eq experience.user.experienceGroups[@index] 'Administrator'}}   
            <li><a href="https://mylink.com">Admin only link</a></li>
          {{/eq}}
        {{/each}}

Any ideas?

Regards

Ashley

Try this. When looping, the context of the current item is available at this. -

        {{#each experience.user.experienceGroups}}
          {{#eq this.name 'Administrator'}}   
            <li><a href="https://mylink.com">Admin only link</a></li>
          {{/eq}}
        {{/each}}

Awesome, that worked! Thanks, you always know the answer…

Happy to help. Keep the questions coming. :slight_smile:

Just curious if this is the optimal method for managing Group access? In a true commercial scale multi-tenant deployment it seems that this approach might get a bit unwieldy.