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 » General » How do I sort my search results by...

How do I sort my search results by classid like ?

How do I sort my search results by classid like ?

Sunday 12 October 2003 12:04:49 am - 3 replies

Help -- I've attempted to sort my search results by class_identifier using the search operator in EZ 3.2, but it doesn't seem to work. I'm using

sort_by, array('class_identifier',true())

but my search results are still sorted in some fallback default way, not by class ID. any ideas as to how to get this working?


Monday 13 October 2003 6:56:25 pm

Hi there Craig

Are you trying to sort by class (ie. Article, Product, Forum Message, etc.)?

If so you want to use:

sort_by, array( 'class_name', true() )

If however you want to sort on an identifier with the class it is not documented very well, but what you need to do is also specify the name of the class identifier.

ie. The class "Product" has an identifier "product_nr", to sort by this you need to use:

sort_by, array( 'class_identifier', array( 'product_nr', true() ) )

Hope this helps.

Monday 13 October 2003 7:42:20 pm

I think, you should take care about terminologies here:
"Class name" is not "class identifier" and this is NOT "class ID".

For example:
The Class name might be "Article" (or, if I decide to translate it "Artikel"blunk.gif Emoticon
The class identfier would be "article" and you should not change this in translating or in customization as this could and should be used in templates. I think, this is, what Craig wants to do.
Class-ID is a number (ie. "1"blunk.gif Emoticon.

Tuesday 02 December 2003 11:28:55 am

You should create your own search handler page. In that page you do several search operator with different class.

You should read the Search document in the Customize. It will explain everything you need...


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

36 542 Users on board!

Forums menu

Proudly Developed with from