Forums / Setup & design / Filtering search results by class doesn't work...

Filtering search results by class doesn't work...

Author Message

Uchendu Nwachukwu

Saturday 29 April 2006 9:41:45 pm

So the documentation says I can use the "class_id" attribute of the fetch(content, search) function to specify that it should only return results from a specific class.

Only it doesn't. It returns every matching result it can find.

Does anyone have any suggestions?

Ɓukasz Serwatka

Saturday 29 April 2006 11:16:45 pm

Hi,

You can pass get variable SearchContentClassID to content/advancedsearch or if you want control search from the template you need to change INI setting in

site.ini.append.php:
[SearchSettings]
SearchViewHandling=template

Then you can use the "class_id" attribute of the fetch(content, search) function in template. Also make sure that class_id is an integer not at string like "folder".

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Uchendu Nwachukwu

Sunday 30 April 2006 11:25:27 am

Thanks, making that .ini change fixed it.