Forums / Developer / class filtering with ezfind

class filtering with ezfind

Author Message

Yaseen Carim Bacor

Thursday 17 February 2011 4:24:19 am

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

Yaseen Carim Bacor

Thursday 17 February 2011 9:13:36 pm

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

Marko Žmak

Thursday 17 February 2011 11:26:31 pm

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".

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Yaseen Carim Bacor

Friday 18 February 2011 12: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

Marko Žmak

Friday 18 February 2011 3:00:09 am

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.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Yaseen Carim Bacor

Friday 18 February 2011 4:59:56 am

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

Marko Žmak

Friday 18 February 2011 5:48:59 am

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

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

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Yaseen Carim Bacor

Sunday 20 February 2011 9:44:40 pm

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

Yaseen Carim Bacor

Monday 21 February 2011 3:46:55 am

The problem was with ezfind 2.1.

When i upgrade to ezfind 2.2.

It work fine.

Thanks