eZ Community » Forums » Developer » class filtering with ezfind
expandshrink

class filtering with ezfind

class filtering with ezfind

Thursday 17 February 2011 1:24:19 pm - 8 replies

Hi,

I am trying to make a search in sub classes of my ezp project.

I do add the following line in the search.tpl, ezfind fetch function section.

'class_id', array(38, 39, 40)

but it is not working.

Can anyone help me?

Thanks in advanced.

Yaseen

Friday 18 February 2011 6:13:36 am

Actually my problem is that i have 3 main classes connected to 3 tpls. This part is being index well with the ezfind. The problem arises with 3 other sub-classes connected to another 3 tpls.

When i make a search all result for the 3 main classes are being return.

But not the 3 subclasses.

The 3 main tpls contain links to the sub tpls.

Can anyone help?

In this situation is the 'class_id', array(38, 39, 40) applicable

Thanks

Yaseen

Friday 18 February 2011 8:26:31 am

You should also include the "sub-classes" in the class_id parameter. For example, like this:

'class_id', array(38, 39, 40, 41, 42, 43)

where 41, 42, 43 are the class ID's of your "sub-classes".

Friday 18 February 2011 9:04:37 am

Dear Marko Zmak,

Thank you for the reply.

I have already tried the solution but it is not working.

I have made the changes in extension/ezfind/design/standard/templates/content/search.tpl and extension/ezfind/design/ezwebin/templates/content/search.tpl.

I am using the default ezwebin template.

Thanks

Yaseen

Modified on Friday 18 February 2011 9:25:45 am by Yaseen Carim Bacor

Friday 18 February 2011 12:00:09 pm

Few things to check:

  • see if all the classes you search for are set to be searchable
  • see if the attributes of the classes are set to be searchable
  • does the anonymous have the permissions to read all the classes (can you open the objects of this classes in frontend?)
  • are the nodes of this "sub-classes" maybe hidden?
  • are the objects of the "sub-classes" really indexed in ezfind? (do you get them in the search results when doing search in the admin interface?)

And you should make changes only in extension/ezfind/design/ezwebin/templates/content/search.tpl, but first check if this is really the template that is used.

Friday 18 February 2011 1:59:56 pm

Ok Marko Zmak,

It is now working fine. Except for telephone number. Generally telephone number contains spaces. So with space it do not return the result.

If i remove the space it work fine.

Can you please tell me, how i can modify the tpl to use space?

Yaseen

Friday 18 February 2011 2:48:59 pm

I don't quite understand your question about the spaces.

Could you clarify a little bit what exactly is the problem with the spaces?

Monday 21 February 2011 6:44:40 am

The telephone number with space it does not work.

For example telephone number like 476264726, is OK but like 47 62 64 726. Not ok

I have tried to make some modification with this function in serach.tpl but it does not work.

function ezfTrim( str ) { return str.replace(/^\s+|\s+$/g, '') ; }

Can you please help?

Thanks

Monday 21 February 2011 12:46:55 pm

The problem was with ezfind 2.1.

When i upgrade to ezfind 2.2.

It work fine.

Thanks

expandshrink

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

36 542 Users on board!

Forums menu