cancel
Showing results for 
Search instead for 
Did you mean: 

Display dashlet based on a condition

arnoldschrijve1
Champ on-the-rise
Champ on-the-rise
Is it possible to show a site dashlet based on a condition, e.g. 'only show when site node has property X with value Y'?
Maybe by creating a custom evaluator and adding it to the dashlet component declaration in presets.xml. Is this possible?
2 REPLIES 2

ddraper
World-Class Innovator
World-Class Innovator
One approach to this would be to use a Sub-Component evaluator to decide whether or not to render the dashlet. The problem is that unless you can guarantee the location of the dashlet in the dashboard you will need to override the Sub-Component definition for all 15 slots on the dashboard and run the evaluation on all of them. This is because there is no information on which region the dashlet component will be bound to and the dashlet components are defined by their location rather than any specific identifier. More information on hiding Sub-Components based on evaluations can be found in this blog post: http://blogs.alfresco.com/wp/ddraper/2011/07/29/sub-component-evaluations/

arnoldschrijve1
Champ on-the-rise
Champ on-the-rise
Thanks a lot, David! Luckily in my requirement I can guarantee the location, so that should work!

PS. I always really enjoy your blog posts; great information!!