01-10-2020 11:38 AM
Hello, Is there a way to not list the documents with the facet "HiddenInNavigation" in the result of nxql.
Scenario:
1- Add the "HiddenInNavigation" facet dynamically (via a operation which calls the 'document.addfacet' method).
2- search via the search menu.
-> result: the document is not listed
3- search via an nxql request with mixinType! = 'HiddenInNavigation'
-> result: the document is listed.
Thank you.
01-12-2020 09:44 AM
Hello,
I think there is not any way of doing that. From the documentation:
ecm:mixinType: a list of the document facets (
DocumentModel.getFacets()
) with some restrictions. 1. the facet Immutable is never seen. 2. the facets Folderish and HiddenInNavigation are never seen on document instances (only if they're on the type). 3. like for other list properties, it can be used only with operators=
,<>
,IN
andNOT IN
.
Link: https://doc.nuxeo.com/nxdoc/nxql/#special-nxql-properties
That's why using the "ecm:mixinType != 'HiddenInNavigation'" doesn't work, and the documents appear in the NXQL query.
A possible approach could be to define your own facet. Just read this for more information about creating facets: https://doc.nuxeo.com/studio/how-to-create-and-use-document-facets/
After creating the new facet (let's say, "CustomNXQLFacet"), you can add the "HiddenInNavigation" facet along with "CustomNXQLFacet" facet, and include it in the NXQL query: "... AND ecm:mixinType != 'CustomNXQLFacet'".
Regards.
01-12-2020 09:44 AM
Hello,
I think there is not any way of doing that. From the documentation:
ecm:mixinType: a list of the document facets (
DocumentModel.getFacets()
) with some restrictions. 1. the facet Immutable is never seen. 2. the facets Folderish and HiddenInNavigation are never seen on document instances (only if they're on the type). 3. like for other list properties, it can be used only with operators=
,<>
,IN
andNOT IN
.
Link: https://doc.nuxeo.com/nxdoc/nxql/#special-nxql-properties
That's why using the "ecm:mixinType != 'HiddenInNavigation'" doesn't work, and the documents appear in the NXQL query.
A possible approach could be to define your own facet. Just read this for more information about creating facets: https://doc.nuxeo.com/studio/how-to-create-and-use-document-facets/
After creating the new facet (let's say, "CustomNXQLFacet"), you can add the "HiddenInNavigation" facet along with "CustomNXQLFacet" facet, and include it in the NXQL query: "... AND ecm:mixinType != 'CustomNXQLFacet'".
Regards.
01-15-2020 11:30 AM
many thanks
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.