How do I sort my search results by classid like ez.no ?

Author Message

Craig Hirsch

Saturday 11 October 2003 3:04:49 pm

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?

--Craig

--
chirsch{AT}gmail{d.t}com

David Syers

Monday 13 October 2003 9:56:25 am

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.

Marco Zinn

Monday 13 October 2003 10:42:20 am

Hi,
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")
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").

Marco
http://www.hyperroad-design.com

Aya Brea

Tuesday 02 December 2003 2: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...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.