Forums / Developer / advanced search on multiples ContentClassAttributeID[solved]

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

eZ debug

Timing: Jan 18 2025 18:42:46
Script start
Timing: Jan 18 2025 18:42:46
Module start 'content'
Timing: Jan 18 2025 18:42:47
Module end 'content'
Timing: Jan 18 2025 18:42:47
Script end

Main resources:

Total runtime1.0325 sec
Peak memory usage4,096.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.9688180.7969
Module start 'content' 0.00540.8450 768.7656646.3594
Module end 'content' 0.85030.1821 1,415.1250341.0234
Script end 1.0324  1,756.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3927210.0002
Check MTime0.00170.1659210.0001
Mysql Total
Database connection0.00060.061410.0006
Mysqli_queries0.931890.24982080.0045
Looping result0.00330.32342060.0000
Template Total1.003097.120.5015
Template load0.00250.241920.0012
Template processing1.000596.901520.5003
Template load and register function0.00010.010310.0001
states
state_id_array0.00130.125910.0013
state_identifier_array0.00110.106120.0005
Override
Cache load0.00230.2204590.0000
Sytem overhead
Fetch class attribute can translate value0.00250.238340.0006
Fetch class attribute name0.00110.1096100.0001
XML
Image XML parsing0.00190.182640.0005
class_abstraction
Instantiating content class attribute0.00000.0033140.0000
General
dbfile0.00280.2759390.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 45
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs