Filtering nuxeo-slot-content

I would like to hide the most of the slot items for the anonymous user. For the actions we can use the <filter-id> tag and predefined filters like in this example:

<action id="newDocument" link="select_document_type" enabled="true"    label="action.new.document" icon="/icons/action_add.gif">
  <category>SUBVIEW_UPPER_LIST</category>  
  <filter-id>create</filter-id>
</action>

Is there a way to filter the slot contents using the <filter-id> tag as above or the only way is using <nuxeo-filter> like this:

<nuxeo-slot-content name="recentsDrawerItem" slot="DRAWER_ITEMS" order="20">
  <template>
    <nuxeo-filter document="[[document]]" user="[[user]]" expression="!user.isAnonymous">
      <template>
        <nuxeo-menu-icon name="recents" icon="nuxeo:recent" label="app.recentlyViewed"></nuxeo-menu-icon>
      </template>
    </nuxeo-filter>
  </template>
</nuxeo-slot-content>
0 votes

1 answers

325 views

ANSWER



You have to use nuxeo-filter element in your slot contribution. filter-id tag is only for Nuxeo XML Extensions.

1 votes