Forum Discussion
Hey StanGromer can i leverage <#elseif> for another role.name and<#if user_has_role > display this content. ?
In theory, I'd like to Display role-based links to boards for role A. Display the same links, however, if I have a role B, display 1 more link. While displaying the same content, if I have role 3, display 1 more link or a different set of links.
Any ideas around the code you already have implemented for numerous roles under the same component?
I don’t know the specific code to make that work but I’m sure there is a way! Alternatively what I have done is just reuse the code/component multiple times over, different roles for each.
First time = OnlyRole A sees it, leave else blank
second time = Only content for Role B, leave else blank
third time = only content for role C, leave else blank.
fourth time = no roles, leave content blank, set else message to what you want all others to see.
Probably better ways to do it then that but i’m not an engineer, just making stuff up as I go, lol 🥳
Related Content
- 4 years ago
- 10 years ago