- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2014 04:18 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2014 07:41 PM
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/nux...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2014 07:41 PM
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/nux...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2014 08:02 PM
I was thinking of something along those lines, but I didn't want to have to hard code the behavior.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2014 08:06 PM
Ooh! Followup, is there a way to find out the name of the view? IE, checkName('viewname') to determine if the view name matches? At least then I could use the checkFilter() in conjunction, and not REALLY hardcode it in there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2014 08:22 PM
If you mean the name of the content view, yes, you have access to #{contentView.name}. You can add to it the result layout name #{cvLayout.name} and define a filter id to check like this, maybe using a marker (or another convention) to avoid collisions with other filter ids.
