eZ Community » Forums » eZ Publish 5 Platform » Sort fetch result by INDEX of select...
expandshrink

Sort fetch result by INDEX of select object, not it's value

Sort fetch result by INDEX of select object, not it's value

Friday 24 November 2017 2:14:15 pm

Hi

 

I have a class with identifier "studiekatalog" and a select fiels "program_level".

 

I want the fetch to sort my result based on the INDEX of the selected value of program_level, not the textual value.

 

Any suggestion how to do this?

 

This is the template code I'm using topday - that is sorting based on the textual value og program_level:

 $courses = fetch( 'ezfind', 'search',                        hash('query', '',                             'filter', $filter,                             'subtree_array', array( $subtree ),                             'class_id', $studieclass,                             'offset', $view_parameters.offset,                             'limit', $page_limit,                             'sort_by', hash(concat($studieclassobject.identifier,'/program_level'), 'asc', 'name', 'asc')                        ))}

Modified on Friday 24 November 2017 2:17:21 pm by Tore Minsaas

No reply yet!

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from