<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Configure default sort order for Documents &amp; Media portlet</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117597966" />
  <subtitle>Configure default sort order for Documents &amp; Media portlet</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117597966</id>
  <updated>2026-04-04T23:05:27Z</updated>
  <dc:date>2026-04-04T23:05:27Z</dc:date>
  <entry>
    <title>RE: Configure default sort order for Documents &amp; Media portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118379254" />
    <author>
      <name>Aamjad Pinjari</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118379254</id>
    <updated>2020-01-30T09:31:59Z</updated>
    <published>2020-01-30T09:31:59Z</published>
    <summary type="html">thanks for reply,but it&amp;#39;s not applying for all users it&amp;#39;s only applying for admin only.&lt;br /&gt;thanks</summary>
    <dc:creator>Aamjad Pinjari</dc:creator>
    <dc:date>2020-01-30T09:31:59Z</dc:date>
  </entry>
  <entry>
    <title>RE: Configure default sort order for Documents &amp; Media portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118378427" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118378427</id>
    <updated>2020-01-30T07:25:27Z</updated>
    <published>2020-01-30T07:25:27Z</published>
    <summary type="html">Hi ,&lt;br /&gt;i think same code should  apply to all user . as it might be apply preference to portal</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2020-01-30T07:25:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: Configure default sort order for Documents &amp; Media portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118377756" />
    <author>
      <name>Aamjad Pinjari</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118377756</id>
    <updated>2020-01-30T06:30:18Z</updated>
    <published>2020-01-30T06:30:18Z</published>
    <summary type="html">Hiii,you did it for particular user but i want to do it for all users in my portal can you suggest me a way to do itthanks.</summary>
    <dc:creator>Aamjad Pinjari</dc:creator>
    <dc:date>2020-01-30T06:30:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: Configure default sort order for Documents &amp; Media portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117734369" />
    <author>
      <name>André Bräkling</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117734369</id>
    <updated>2019-11-11T07:12:34Z</updated>
    <published>2019-11-11T07:12:34Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;You're right, I ran it as a Groovy script and this did the trick:&lt;br&gt;&lt;pre&gt;&lt;code&gt;import com.liferay.portlet.PortalPreferencesImpl;
import com.liferay.portal.kernel.portlet.PortletPreferencesFactoryUtil;
PortalPreferencesImpl portalPreferences = &amp;amp;nbsp;PortletPreferencesFactoryUtil.getPortalPreferences([i]--USER_ID--[/i], true);
portalPreferences.setValue("com_liferay_document_library_web_portlet_DLPortlet", "order-by-col", "title");
portalPreferences.setValue("com_liferay_document_library_web_portlet_DLPortlet", "order-by-type", "asc");&lt;/code&gt;&lt;/pre&gt;Thanks a lot!I just wonder why there is no way to configure this in the portlet configuration, the admin panel or at least via config file. I'll ask for a Jira account and write a feature request here.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>André Bräkling</dc:creator>
    <dc:date>2019-11-11T07:12:34Z</dc:date>
  </entry>
  <entry>
    <title>RE: Configure default sort order for Documents &amp; Media portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117710420" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117710420</id>
    <updated>2019-11-08T11:03:31Z</updated>
    <published>2019-11-08T11:03:31Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi&lt;br&gt; i dont think its will work adding in portal-ext.properties , it needs to added&amp;nbsp; to database from below api.&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;PortalPreferences portalPreferences = &amp;amp;nbsp;PortletPreferencesFactoryUtil.getPortalPreferences(request);&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;nbsp; portalPreferences.setValue("com_liferay_document_library_web_portlet_DLPortlet", "order-by-col", "title");&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;portalPreferences.setValue("com_liferay_document_library_web_portlet_DLPortlet", "order-by-type", "asc");&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2019-11-08T11:03:31Z</dc:date>
  </entry>
  <entry>
    <title>RE: Configure default sort order for Documents &amp; Media portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117687702" />
    <author>
      <name>André Bräkling</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117687702</id>
    <updated>2019-11-07T12:01:16Z</updated>
    <published>2019-11-07T12:01:16Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Thanks for your replay. I added the preferences to my portal-ext.properties (if possible, I want to avoid programmatical changes for this issue):&lt;pre&gt;&lt;code&gt;com_liferay_document_library_web_portlet_DLPortlet.order-by-col=title
com_liferay_document_library_web_portlet_DLPortlet.order-by-type=asc
&lt;/code&gt;&lt;/pre&gt;After restarting, they&amp;nbsp;appear in my Portal Properties (Server Administration -&amp;gt; Properties -&amp;gt; Portal Properties), but by default the Documents &amp;amp; Media still sorts by modified date. Am I missing something?&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>André Bräkling</dc:creator>
    <dc:date>2019-11-07T12:01:16Z</dc:date>
  </entry>
  <entry>
    <title>RE: Configure default sort order for Documents &amp; Media portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117614649" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117614649</id>
    <updated>2019-10-31T11:52:52Z</updated>
    <published>2019-10-31T11:52:52Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi ,You can try setting the portal preference with orderByCol ,&amp;nbsp;&amp;nbsp;&lt;pre&gt;&lt;code&gt; &amp;amp;nbsp;PortalPreferences portalPreferences = &amp;amp;nbsp;PortletPreferencesFactoryUtil.getPortalPreferences(request);&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;nbsp; portalPreferences.setValue("com_liferay_document_library_web_portlet_DLPortlet", "order-by-col", "title");&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;portalPreferences.setValue("com_liferay_document_library_web_portlet_DLPortlet", "order-by-type", "asc");

&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2019-10-31T11:52:52Z</dc:date>
  </entry>
  <entry>
    <title>Configure default sort order for Documents &amp; Media portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117597965" />
    <author>
      <name>André Bräkling</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117597965</id>
    <updated>2019-10-30T08:42:35Z</updated>
    <published>2019-10-30T08:42:35Z</published>
    <summary type="html">Hi everbody.&lt;br /&gt;&lt;br /&gt;We are using the Documents &amp;amp; Media portlet to offer  a file space to our users. &lt;br /&gt;&lt;br /&gt;By default, the portlet orders by &amp;#34;Modified date&amp;#34;, but we want to change this default setting to &amp;#34;Order By: Title&amp;#34;.I had a look at the portlet configuration, the control panel configuration, etc. but I don&amp;#39;t see where to change this setting.&lt;br /&gt;&lt;br /&gt;Maybe I&amp;#39;m missing something... can anybody please give me a hint?&lt;br /&gt;&lt;br /&gt;Thanks in advance!&lt;br /&gt;&lt;br /&gt;André</summary>
    <dc:creator>André Bräkling</dc:creator>
    <dc:date>2019-10-30T08:42:35Z</dc:date>
  </entry>
</feed>
