<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WEB UI: How to sort items in the table view by Title in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316156#M3157</link>
    <description>&lt;P&gt;Thank you [Rodri ](https&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jan 2020 11:33:51 GMT</pubDate>
    <dc:creator>Anton_Petrov</dc:creator>
    <dc:date>2020-01-28T11:33:51Z</dc:date>
    <item>
      <title>WEB UI: How to sort items in the table view by Title</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316153#M3154</link>
      <description>&lt;P&gt;Hi! In the drawer the browser elements are sorted by Title by default. However, in the main container, using table view there is no sorting options (as in the grid view) and it seems that they appear by the date modified in reverse order (from newest to oldest). Where and what I would contribute (without Studio) to make the columns sortable, or at least sort the rows the same way as in the drawer? Thanks in advance!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="type an image title"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1947i2ABC59A0D0D4E3A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="type an image title" alt="type an image title" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2020 14:36:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316153#M3154</guid>
      <dc:creator>Anton_Petrov</dc:creator>
      <dc:date>2020-01-12T14:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: WEB UI: How to sort items in the table view by Title</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316154#M3155</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I think there are several ways of achieving it, and one of them could be overriding the page provider used to retrieve the documents inside a folder. If you check the Web UI request while loading the page, you will see the page provider used is &lt;STRONG&gt;advanced_document_content&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;So you only need to override it. Information about the page provider: &lt;A href="https://explorer.nuxeo.com/nuxeo/site/distribution/server-10.10/viewContribution/org.nuxeo.ecm.document.pageproviders--providers"&gt;https://explorer.nuxeo.com/nuxeo/site/distribution/server-10.10/viewContribution/org.nuxeo.ecm.document.pageproviders--providers&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You need to scroll to the "&lt;STRONG&gt;advanced_document_content&lt;/STRONG&gt;" page provider definition and copy it in your own contribution. As you can see, there is a property called "&lt;STRONG&gt;sort&lt;/STRONG&gt;" at the end, property that you have to modify like follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;sort ascending="true" column="dc:title"/&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You also need to remember that you are overriding an existing page provider, so you need to include the following requirement to your component in order to be sure it will be loaded after the default page providers are loaded:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;require&amp;gt;org.nuxeo.ecm.document.pageproviders&amp;lt;/require&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have tested this solution and it worked as expected. Below you can find the full code. Hope it helps!&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Full code:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;component name="org.nuxeo.ecm.document.pageproviders.override"&amp;gt;
	&amp;lt;require&amp;gt;org.nuxeo.ecm.document.pageproviders&amp;lt;/require&amp;gt;
	
	&amp;lt;extension target="org.nuxeo.ecm.platform.query.api.PageProviderService" point="providers"&amp;gt;
		&amp;lt;coreQueryPageProvider name="advanced_document_content"&amp;gt;
			&amp;lt;trackUsage&amp;gt;true&amp;lt;/trackUsage&amp;gt;
			&amp;lt;property name="maxResults"&amp;gt;DEFAULT_NAVIGATION_RESULTS&amp;lt;/property&amp;gt;
			&amp;lt;whereClause docType="AdvancedContent"&amp;gt;
				&amp;lt;fixedPart&amp;gt;
					ecm:isVersion = 0 AND ecm:mixinType != 'HiddenInNavigation'
				&amp;lt;/fixedPart&amp;gt;
				&amp;lt;predicate operator="FULLTEXT" parameter="dc:title"&amp;gt;
					&amp;lt;field name="title" schema="advanced_content"/&amp;gt;
				&amp;lt;/predicate&amp;gt;
				&amp;lt;predicate operator="=" parameter="ecm:parentId"&amp;gt;
					&amp;lt;field name="ecm_parentId" schema="advanced_content"/&amp;gt;
				&amp;lt;/predicate&amp;gt;
				&amp;lt;predicate operator="=" parameter="ecm:isTrashed"&amp;gt;
					&amp;lt;field name="ecm_trashed" schema="advanced_content"/&amp;gt;
				&amp;lt;/predicate&amp;gt;
			&amp;lt;/whereClause&amp;gt;
			&amp;lt;aggregates&amp;gt;
				&amp;lt;aggregate id="dc_last_contributor_agg" parameter="dc:lastContributor" type="terms"&amp;gt;
					&amp;lt;field name="dc_last_contributor_agg" schema="advanced_content"/&amp;gt;
					&amp;lt;properties&amp;gt;
						&amp;lt;property name="size"&amp;gt;10&amp;lt;/property&amp;gt;
					&amp;lt;/properties&amp;gt;
				&amp;lt;/aggregate&amp;gt;
				&amp;lt;aggregate id="dc_modified_agg" parameter="dc:modified" type="date_range"&amp;gt;
					&amp;lt;field name="dc_modified_agg" schema="advanced_content"/&amp;gt;
					&amp;lt;properties&amp;gt;
						&amp;lt;property name="format"&amp;gt;"dd-MM-yyyy"&amp;lt;/property&amp;gt;
					&amp;lt;/properties&amp;gt;
					&amp;lt;dateRanges&amp;gt;
						&amp;lt;dateRange fromDate="now-24H" key="last24h" toDate="now"/&amp;gt;
						&amp;lt;dateRange fromDate="now-7d" key="lastWeek" toDate="now-24H"/&amp;gt;
						&amp;lt;dateRange fromDate="now-1M" key="lastMonth" toDate="now-7d"/&amp;gt;
						&amp;lt;dateRange fromDate="now-1y" key="lastYear" toDate="now-1M"/&amp;gt;
						&amp;lt;dateRange key="priorToLastYear" toDate="now-1y"/&amp;gt;
					&amp;lt;/dateRanges&amp;gt;
				&amp;lt;/aggregate&amp;gt;
			&amp;lt;/aggregates&amp;gt;
			&amp;lt;sort ascending="true" column="dc:title"/&amp;gt;
			&amp;lt;pageSize&amp;gt;20&amp;lt;/pageSize&amp;gt;
		&amp;lt;/coreQueryPageProvider&amp;gt;
	&amp;lt;/extension&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Jan 2020 18:06:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316154#M3155</guid>
      <dc:creator>Rodri_</dc:creator>
      <dc:date>2020-01-12T18:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: WEB UI: How to sort items in the table view by Title</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316155#M3156</link>
      <description>&lt;P&gt;nuxeo-data-table-column has a sortBy attribute that could be used. Please see here: &lt;A href="https://www.webcomponents.org/element/nuxeo/nuxeo-ui-elements/elements/nuxeo-data-table-column"&gt;https://www.webcomponents.org/element/nuxeo/nuxeo-ui-elements/elements/nuxeo-data-table-column&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 16:32:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316155#M3156</guid>
      <dc:creator>Jackie_A</dc:creator>
      <dc:date>2020-01-21T16:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: WEB UI: How to sort items in the table view by Title</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316156#M3157</link>
      <description>&lt;P&gt;Thank you [Rodri ](https&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 11:33:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316156#M3157</guid>
      <dc:creator>Anton_Petrov</dc:creator>
      <dc:date>2020-01-28T11:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: WEB UI: How to sort items in the table view by Title</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316157#M3158</link>
      <description>&lt;P&gt;Thanks, [Jackie A](https&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 11:37:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/web-ui-how-to-sort-items-in-the-table-view-by-title/m-p/316157#M3158</guid>
      <dc:creator>Anton_Petrov</dc:creator>
      <dc:date>2020-01-28T11:37:17Z</dc:date>
    </item>
  </channel>
</rss>

