Foros de discusión

WebContent - sorting by structure fields

thumbnail
Vitaliy Koshelenko, modificado hace 10 años.

WebContent - sorting by structure fields

Expert Mensajes: 319 Fecha de incorporación: 25/03/11 Mensajes recientes
Hi, all.

Is it possible to sort WebContents by the values of it's structure fields?
(for example, if I create structure 'Product' with fields 'name', 'description', and then create some WebContent of this structure, may I sort these WebContents by 'name' field?)
I know, that content is stored as xml, and it's not possible to make sorting with an sql query, but may be there are some other solutions for this ?

Thanks, Vitaliy
thumbnail
Milen Dyankov, modificado hace 10 años.

RE: WebContent - sorting by structure fields

Expert Mensajes: 310 Fecha de incorporación: 30/10/12 Mensajes recientes
You mean sort the list in WCM section in ControlPanel or in your custom portlet?
Both are possible with some customizations just the approach is a bit different.
thumbnail
Vitaliy Koshelenko, modificado hace 10 años.

RE: WebContent - sorting by structure fields

Expert Mensajes: 319 Fecha de incorporación: 25/03/11 Mensajes recientes
In my custom portlet. Any ideas?
thumbnail
Milen Dyankov, modificado hace 10 años.

RE: WebContent - sorting by structure fields

Expert Mensajes: 310 Fecha de incorporación: 30/10/12 Mensajes recientes
All custom fields are stored in the index together with the article. Thus it should be possible to simply use one of the search methods in JournalArticleLocalServiceUtil that use the index and provide appropriate sort options.