Fórum

WebContent - sorting by structure fields

thumbnail
Vitaliy Koshelenko, modificado 10 Anos atrás.

WebContent - sorting by structure fields

Expert Postagens: 319 Data de Entrada: 25/03/11 Postagens Recentes
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 10 Anos atrás.

RE: WebContent - sorting by structure fields

Expert Postagens: 310 Data de Entrada: 30/10/12 Postagens Recentes
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 10 Anos atrás.

RE: WebContent - sorting by structure fields

Expert Postagens: 319 Data de Entrada: 25/03/11 Postagens Recentes
In my custom portlet. Any ideas?
thumbnail
Milen Dyankov, modificado 10 Anos atrás.

RE: WebContent - sorting by structure fields

Expert Postagens: 310 Data de Entrada: 30/10/12 Postagens Recentes
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.