Forum Discussion
I tried to adapt this example to display different custom content based on different roles but I can't get hold of the current user's roles.
And as a bonus question: When I try to use this freemarker code in Custom Content it shows a "This widget could not be displayed." message instead. Is Freemarker code not allowed within Custom Content?
Hi Claudius,
Regarding your quesiton about freemarker in custom components: freemarker in custom content should be ok. If it wasn't rendering freemarker then you would probably see some of the freemarker code showing up as plan text or as invalid markup. If you are getting a "this widget cannot be displayed message" it is most likely because there is an exception when some of the freemarker runs. If you are logged in as someone who has full admin access, you should see the freemarker stack trace instead of the "widget cannot be displayed" message and this will help you debug the issue.
Related Content
- 11 years ago