3 weeks ago
2 weeks ago - last edited 2 weeks ago
"filter-by" needs to contain the id of the predicate or aggregate that you're using for the filtering (as defined in your page provider).
EDIT: There's an example in the source, can't find one in the doc unfortunately:
2 weeks ago
In the Studio Designer, it seems to be using [[nxProvider]] but clearly this must be a build in PP because I cannot find the definition for it. When I trace the traffic it seems to be calling the "advanced_document_content" . Is there a way to customize it using the following in the XML Extensions of Nuxeo Studio?
<component name="org.nuxeo.ecm.document.pageproviders.override">
<require>org.nuxeo.ecm.document.pageproviders</require>
<extension target="org.nuxeo.ecm.platform.query.api.PageProviderService" point="providers">
<coreQueryPageProvider name="advanced_document_content">
<trackUsage>true</trackUsage>
<property name="maxResults">DEFAULT_NAVIGATION_RESULTS</property>
<whereClause docType="AdvancedContent">
<fixedPart>
ecm:isVersion = 0 AND ecm:mixinType != 'HiddenInNavigation'
</fixedPart>
<predicate operator="FULLTEXT" parameter="dc:title">
<field name="title" schema="advanced_content"/>
</predicate>
<predicate operator="=" parameter="ecm:parentId">
<field name="ecm_parentId" schema="advanced_content"/>
</predicate>
<predicate operator="=" parameter="ecm:isTrashed">
<field name="ecm_trashed" schema="advanced_content"/>
</predicate>
<predicate operator="STARTSWITH" parameter="employee:FirstName">
<field name="FirstName" schema="advanced_content"/>
</predicate>
Thank you
SG
2 weeks ago - last edited 2 weeks ago
Yes "advanced_document_content" is an OOTB page provider. Yes you can override any OOTB page provider, whether via XML contrib or just creating a PP in Studio with the same ID (which is effectively the same thing, in the end it's an XML contrib). I'd recommend making a PP of your own though, it will have fewer side effects. The "advanced_document_content" PP is used throughout WebUI so you need to be careful when modifying it.
In general whenever I create a custom Folderish document type I will also create a matching page provider, as inevitably I will need to customize the viewing of its contents.
2 weeks ago
Thank you. So if the Folderish object is "Invoices", I should create a PP for it and use the PP in the View layout?
The PP should specify the predicates and aggregates from contained objects?
Thanks,
SG
2 weeks ago
Yes exactly.
2 weeks ago
Thank you. In the NXQL query, how do I pass the current folders id? Also I am trying to find documentation on how the following should be set. Can you point me in the right direction?
Thank you,
2 weeks ago - last edited 2 weeks ago
@Sudarshan_Ghate wrote:Thank you. In the NXQL query, how do I pass the current folders id?
Typically you add a predicate for system -> parentId (aka ecm:parentId) to the PP and then pass the value using the "params" attribute. You may note that Nuxeo.DocumentContentBehavior hard-codes the predicate to "ecm_parentId" whereas Studio generates "system_parentId" so in that case, when using this behavior, you can override the "_computeParams" function; just create a function named "_computeParams" in the View layout for your Invoices document type and adjust the params.
@Sudarshan_Ghate wrote:Also I am trying to find documentation on how the following should be set. Can you point me in the right direction?
Thank you,
There shouldn't be any need to change "name". When you generate the View layout for a folderish document type, Studio generates the necessary code to manage "nxProvider". I.e. you just change the value of the "provider" attribute of the "nuxeo-page-provider" element:
<nuxeo-page-provider provider="my-cool-pp" ...
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.