Default configuration for Documents and Media portlet

txapeldot ., modified 2 Years ago. Junior Member Posts: 91 Join Date: 1/15/15 Recent Posts

Hi all.

Redarding the Documents and Media portlet, is there any way to change the default sort order and display style, by using properties files or, in the worst place, programatically?

In this quite-old post it's suggested to attempt it by using these properties files within 'portal-ext.properties':
com_liferay_document_library_web_portlet_DLPortlet.order-by-col
com_liferay_document_library_web_portlet_DLPortlet.order-by-type

However, and although those properties can be seen loaded in the 'Server Pdministration > Properties' page, it doesn't seem it worked. I don't know if those properties really exist or not; neither do I the range of values those properties could be set.

I'd really appreciate if someone could clarify to me if the intended task can be accomplished by using properties files or, on the contrary, it can only be achieved programatically.
Thanks in advance.

Jamie Sammons, modified 11 Months ago. New Member Posts: 24 Join Date: 6/13/23 Recent Posts

I dont find any properties that are related to sorting the documents and media in portal properties of liferay 7.4.

By the way, Liferay has default sorting functionality for Document & media portlet which you can sort based on title, size or date.

Else, the final way is creating and listing everything in custom portlet. If i am wrong please elaborate your question.

txapeldot ., modified 2 Years ago. Junior Member Posts: 91 Join Date: 1/15/15 Recent Posts

Hi, thanks for your reply.

I do know Liferay has default sorting funcionality. Moreover, Liferay somehow stores the sorting funcionality for every single user. As you say, the way to achieve what I'm attempting to do is listening everything of that portlet; however, I don't know how to manage to do that. Any must-to-read document would really be appreciated.

Thanks.

thumbnail
Mohammed Yasin, modified 2 Years ago. Liferay Master Posts: 593 Join Date: 8/8/14 Recent Posts

Hi,

You can set the default sort order for document and media portlet in Site Setting -> Document and media -> File order.

txapeldot ., modified 2 Years ago. Junior Member Posts: 91 Join Date: 1/15/15 Recent Posts

Hi, thanks for your reply.

Unfortunately, I'm not able to find the track you're providing to me. Could you clarify to me where exactly is that feature available, once you've logged in as an administrator?

Thanks in advance.

thumbnail
Mohammed Yasin, modified 2 Years ago. Liferay Master Posts: 593 Join Date: 8/8/14 Recent Posts

Its under Site Setting -> Document and Media :


 

txapeldot ., modified 2 Years ago. Junior Member Posts: 91 Join Date: 1/15/15 Recent Posts

Thanks for showing me in detail. However, in my Liferay installation (7.2.1-ga2) there isn't that setting. Could you clarify to me what version are you using? Thanks in advance.