This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Sorting Content by Location priority

Sorting Content by Location priority

Sorting Content by Location priority

Thursday 06 November 2014 2:00:46 pm - 4 replies

Is it possible to sort content by location priority? 
I have community version 2014.07 and it's still possible to put this in sort clauses:

new SortClause\LocationPriority(Query::SORT_DESC)

but it's mark as deprecated.
What should I use instead? I want to only fetch content objects and pass it to template.

Modified on Thursday 06 November 2014 2:01:26 pm by Łukasz Berwald

Thursday 06 November 2014 2:07:37 pm


new SortClause\Location\Priority(Query::SORT_DESC)

Modified on Thursday 06 November 2014 2:08:08 pm by Carlos Revillo

Thursday 06 November 2014 2:50:56 pm

The reply has been removed because of violation of forum rules.

Friday 07 November 2014 12:52:20 pm

Sorry. I dont know why your Reply has been removed. It shouldnt imho. I Have what you said in my email though.


Error you have says it all. Priority is a location property not a content one, so it makes Sense you cant sort content bpriority. Please not that a content can have different locations with different priorities.


So, i would go for a location search, loop over the results and use content service to load the related contents.

Friday 07 November 2014 12:55:09 pm

About the removal of your Reply maybe it was my mistake. I was with my Mobile yesterday and probably clicked the spam link as I Have rights to do so. Ill try to fix it or talk with someone at ez to restore it. I apologize for this.


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from