Hi all,

I have been digging into 
[url=https://documentation.magnolia-cms.com/display/DOCS/Content+connector#Contentconnector-browsersubapp]Magnolia's
 content connectors[/url] for an app I wrote. 

The property [i]defaultOrder[/i] can be optionally used to specify the default 
sort order of content items in list view. My use case is to sort the node list 
by [mgnl:lastActivated] in a [b]descending[/b] fashion, that is, the topmost 
element in the list should be the one that has been published latest.

However, the ORDER BY part of the query cannot be overwritten by configuration 
(hardcoded 
[url=https://git.magnolia-cms.com/users/apchelintcev/repos/ui/browse/magnolia-ui-vaadin-integration/src/main/java/info/magnolia/ui/vaadin/integration/jcr/container/AbstractJcrContainer.java?at=b723746cbf1488779b12ea2efc19f4f0c57a0da5]here[/url]
 in line 562). 

I've been trying, without success, to invert the order by CASTing the date into 
a number and multiplying by -1, like this:

defaultOrder: [code](-1 * CAST(mgnl:lastActivated AS LONG)) [/code]

This breaks Magnolia as it renders the generated query invalid. Is there any 
chance of achieving a DESC defaultOrder via configuration? What would be the 
best approach to overwrite the respective function in 
[code]AbstractJcrContainer[/code]?

Many thanks,

Dominik

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=5c12a64f-6978-43f6-ac15-ac6874ad9572


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

  • [magnolia-user] Content Connect... Dominik Jednoralski (via Magnolia Forums)

Reply via email to