Disable a content view result layout
I understand that filters are used on actions. However, I want to control who sees a result layout option on a content view. Is this possible? How can I achieve this?
Hi,
Buttons here are custom buttons part of the content view template and are not controlled by filters although that would be a nice improvement.
If you'd like to put this in place, you'll have to override the default template and maybe hardcode behaviour depending on the content views that you'd like to affect. Note that you can still use filters to control this (checking #{webActions.checkFilter('filterId')} in the template, for instance).
The template in 5.8 is at https://github.com/nuxeo/nuxeo-jsf/blob/master/nuxeo-platform-webapp-base/src/main/resources/web/nuxeo.war/incl/content_view_result_layout_actions.xhtml
Being able to use filters on other features would be a huge improvement (maybe a separate parameter?!?!?). Thanks for your answer!
But note that the checkFilter method will return false if the corresponding filter is unknown, so you might need to write a Seam component to help achieving this properly.