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.

eZ debug

Timing: Jan 18 2025 20:58:48
Script start
Timing: Jan 18 2025 20:58:48
Module start 'layout'
Timing: Jan 18 2025 20:58:48
Module start 'content'
Timing: Jan 18 2025 20:58:49
Module end 'content'
Timing: Jan 18 2025 20:58:49
Script end

Main resources:

Total runtime0.7904 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.3047152.6563
Module start 'layout' 0.00480.0023 741.960939.5078
Module start 'content' 0.00710.7818 781.4688645.2500
Module end 'content' 0.78890.0015 1,426.718820.0938
Script end 0.7904  1,446.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3928160.0002
Check MTime0.00130.1654160.0001
Mysql Total
Database connection0.00100.121910.0010
Mysqli_queries0.717890.8065710.0101
Looping result0.00070.0881690.0000
Template Total0.759896.120.3799
Template load0.00200.256220.0010
Template processing0.757795.862520.3789
Template load and register function0.00010.012910.0001
states
state_id_array0.00070.094110.0007
state_identifier_array0.00130.165520.0007
Override
Cache load0.00180.2329590.0000
Sytem overhead
Fetch class attribute can translate value0.00090.108530.0003
Fetch class attribute name0.00090.1192100.0001
XML
Image XML parsing0.00360.453830.0012
class_abstraction
Instantiating content class attribute0.00000.0034140.0000
General
dbfile0.00290.3717280.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
17content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
11content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 45
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs