advanced search on multiples ContentClassAttributeID[solved]

Author Message

ludo thomas

Wednesday 25 January 2006 6:42:23 am

do someone know how to specify 2 or 3 or more ContentClassAttributeID in advanced search?

for the moment i try this but no result:

<form action={"/content/advancedsearch/"|ezurl} method="get">
<input type="hidden" name="SearchContentClassID" value="52" />
<input type="hidden" name="SearchContentClassAttributeID" value="array(319,320)" /> 


<select name="PhraseSearchText">
                <option value=""></option>
                <option value="chambre d' hote">chambre d' hote</option>
</select>

<select name="PhraseSearchText">
                <option value=""></option>
                <option value="rtyrtyrty">rtyrtyrtyr</option>
<option value="rtyrtyrty">rtyrtyrtyr</option>
</select>

as you can see, i need to use multiple selections for my search.
any ideas?

Fabricio Guerrero

Wednesday 25 January 2006 6:56:43 am

Hi,

I just finished today an advanced search similar to yours.. we had to let the user search upto 6 attributes... your code is good just missed one important thing... here's my code:

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="231" />
<select name="Content_search_attribute_fulltext_value[]" class="adv_select">

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="230" />
<select name="Content_search_attribute_fulltext_value[]" class="adv_select">

I have about 5 more dropdowns so i wont put them all... the thing is that the field must be named Content_search_attribute_fulltext_classattribute_id[]... adding the [] at the end creates an array of that field... this way you can have various fields with the same name and managed like an array.

i found this code some where in the forum earlier today.. cant remember where now... try to look for it later on if you're still in need of some help..

Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

ludo thomas

Wednesday 25 January 2006 7:35:08 am

thx fabricio.
I think it's the way..

but.....

I've try your code and nothing.
Do you use selection datatype?

even with 1 select, i have no result.
any hint?

Fabricio Guerrero

Wednesday 25 January 2006 7:51:41 am

Hi,

Do you mean if the attributes are of the selection type?? yes they are.. that's why i created a dropdown for them.. but this shouldn't be a problem..

you can see my search form here(dev server):
http://dev2.oneworldmarket.org/index.php/ccb/content/advancedsearch

btw have you enabled empty searches:

[SearchSettings]
AllowEmptySearch=enabled

can you paste your code so i can have a look?? maybe i or somebody can find something...
but its odd.. just by creating the <inputs> this way it all worked...

Regards,
Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

Fabricio Guerrero

Wednesday 25 January 2006 7:58:38 am

Hi,

This is where i found the way to do it earlier today..maybe its more of a help..

http://ez.no/community/forum/setup_design/custom_advanced_search_question

http://ez.no/community/bugs/search_lacks_multi_attribute_queries

Regards,

Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

ludo thomas

Wednesday 25 January 2006 8:03:58 am

response: You must set AllowEmptySearch=enabled in [SearchSettings] in your site.ini(.append) for this to work, because the normal search field is not used.

laurent le cadet

Thursday 16 March 2006 8:49:41 am

Hi Fabricio,

Did you also include a google navigator to your search ?
Yes ? How did you write page_uri_suffix ?

Laurent

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