Forum Discussion
Thank you, I think it's definitely similar. I'll have to experiment and see how it turns out.
Appreciate your tips and advice.
Just wanted to add in the solution I found for this, in case anybody else is doing similar.
I pulled the text field of our Custom Content, then ran a LiQL query to pull a users' roles based on their user ID.
I then ran through listing the returned role values, comparing them with the contents of the Custom Content field, using the ?contains built-in in FreeMarker.
Then ran a conditional to display the Custom Content component if there was a match, otherwise to hide the component.
If anybody has any suggestions for a simpler solution, I'd love to hear it. Obviously would've been a bit easier if there were a Context Object to pull the user's roles.
My next stage is to then add conditionals into Custom Content to decide which message to display to which rank, but that should be straightforward having built the component to show or hide the CC component based on the roles matching those of the user.
Related Content
- 9 days ago
- 2 months ago
- 2 months ago
- 2 months ago
- 2 months ago