Forums / Setup & design / Custom advanced search and google navigator

Custom advanced search and google navigator

Author Message

laurent le cadet

Thursday 16 March 2006 8:24:03 am

Hi,

I have customized advancedsearch.tpl with some dropdown based on attribute.
The code below appeared only in one section (switch) :

<input type="hidden" name="SearchContentClassID" value="36" />

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="350" />
<p>Type</p>
<select name="Content_search_attribute_fulltext_value[]" >
<option value="">Indifférent</option>
<option value="Appartement">Appartement</option>
<option value="Maison">Maison</option>
</select>

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="352" />
<p>Nbr. de personnes</p>
<select name="Content_search_attribute_fulltext_value[]" >
<option value="">Indifférent</option>
<option value="1 personne">1 personne</option>
<option value="2 personnes">2 personnes</option>
<option value="3 personnes">3 personnes</option>
</select>

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="440" />
<p>Departement</p>
<select name="Content_search_attribute_fulltext_value[]">
<option value="">Indifférent</option>
<option value="22">Cote d'armor</option>
<option value="29">Finistere</option>
</select>

<input type="hidden" name="Content_search_attribute_byrange_classattribute_id[]" value="346" />
<input type="hidden" name="Content_search_attribute_byrange_from[]" value="1" />
<input type="hidden" name="Content_search_attribute_byrange_to[]" value="10000" />

<input id="searchbutton" class="searchbutton" name="SearchButton" type="submit" value="Trouver" />

{include name=navigator
		uri='design:navigator/google.tpl'
		page_uri='/content/advancedsearch'
		page_uri_suffix=concat('?SearchContentClassID=',36,'&Content_search_attribute_fulltext_classattribute_id%5B%5D=',350,'&Content_search_attribute_fulltext_value%5B%5D=',$Content_search_attribute_fulltext_value,'&Content_search_attribute_fulltext_classattribute_id%5B%5D=',352,'&Content_search_attribute_fulltext_value%5B%5D=',$Content_search_attribute_fulltext_value,'&Content_search_attribute_fulltext_classattribute_id%5B%5D=',440,'&Content_search_attribute_fulltext_value%5B%5D=',$Content_search_attribute_fulltext_value,'&Content_search_attribute_byrange_classattribute_id%5B%5D=',346,'&Content_search_attribute_byrange_from%5B%5D=',1,'&Content_search_attribute_byrange_to%5B%5D=',10000)
         item_count=$search_count
         view_parameters=$view_parameters
         item_limit=$page_limit}

I have tried something with page_uri_suffix based on the URL's result of the button's form (which give me what I want), but the differents variables ($Content_search_attribute_fulltext_value) are not considered.

I don't know excatly what to do...

Any hint.

Thanks.

Laurent

laurent le cadet

Thursday 16 March 2006 9:35:44 am

Well,

I tried this :

page_uri_suffix=concat('?SearchContentClassID=',36,'&Content_search_attribute_fulltext_classattribute_id%5B%5D=',350,'&Content_search_attribute_fulltext_value%5B%5D=',$search_array_by_class_attribute_id['350']['value'] ,'&Content_search_attribute_fulltext_classattribute_id%5B%5D=',352,'&Content_search_attribute_fulltext_value%5B%5D=',$search_array_by_class_attribute_id['352']['value'],'&Content_search_attribute_fulltext_classattribute_id%5B%5D=',440,'&Content_search_attribute_fulltext_value%5B%5D=',$search_array_by_class_attribute_id['440']['value'],'&Content_search_attribute_byrange_classattribute_id%5B%5D=',346,'&Content_search_attribute_byrange_from%5B%5D=',1,'&Content_search_attribute_byrange_to%5B%5D=',10000)

It seems to work.

Hope this help.

Laurent

Vidhi ashra

Monday 21 December 2009 8:32:10 pm

Hello Laurent,

Please let me know if you know a way to put dinamically values of &Content_search_attribute_byrange_to and &Content_search_attribute_byrange_from. In your example you put manually 1 and 10000.

I dont know how to pass values of the range on url, I've something like this:

{def $search_doc_date = concat( 'Content_search_attribute_byrange_classattribute_id[]'|urlencode,'=',343,
'&','Content_search_attribute_byrange_from[]'|urlencode,'=',$search_array_by_class_attribute_id['343']['value'], '&','Content_search_attribute_byrange_to[]'|urlencode,'=',$search_array_by_class_attribute_id['343']['value']
}

<input type="hidden" name="Content_search_attribute_byrange_classattribute_id[]" value="343" />
<input id="search_timestamp_from" type="hidden" name="Content_search_attribute_byrange_from[]" value="" />
<input id="search_timestamp_to" type="hidden" name="Content_search_attribute_byrange_to[]" value="" />

{include name=Navigator
uri='design:navigator/google.tpl'
page_uri='/content/advancedsearch/despachos'
page_uri_suffix=concat('?', $search_doc_date,'&SearchContentClassID=',$search_contentclass_id,'&SearchContentClassAttributeID=',$search_contentclass_attribute_id,'&SearchSectionID=',$search_section_id,$search_timestamp|gt(0)|choose('',concat('&SearchTimestamp=',$search_timestamp)),$search_sub_tree|gt(0)|choose( '', concat( '&', 'SubTreeArray[]'|urlencode, '=', $search_sub_tree|implode( concat( '&', 'SubTreeArray[]'|urlencode, '=' ) ) ) ),'&SearchDate=',$search_date)
item_count=$search_count
view_parameters=$view_parameters
item_limit=$page_limit}

Thanks for your atention

Waiting for reply

Vids

Vidhi

eZ debug

Timing: Jan 30 2025 00:53:13
Script start
Timing: Jan 30 2025 00:53:13
Module start 'content'
Timing: Jan 30 2025 00:53:13
Module end 'content'
Timing: Jan 30 2025 00:53:13
Script end

Main resources:

Total runtime0.1680 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.0625180.8125
Module start 'content' 0.00590.0094 768.875098.1484
Module end 'content' 0.01530.1527 867.0234537.3750
Script end 0.1679  1,404.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00301.7731200.0001
Check MTime0.00120.7076200.0001
Mysql Total
Database connection0.00070.395310.0007
Mysqli_queries0.115268.55871410.0008
Looping result0.00110.64621390.0000
Template Total0.152390.710.1523
Template load0.00060.385810.0006
Template processing0.151790.296410.1517
Override
Cache load0.00050.275010.0005
Sytem overhead
Fetch class attribute can translate value0.00060.360210.0006
XML
Image XML parsing0.00020.125610.0002
General
dbfile0.017410.3813200.0009
String conversion0.00000.003130.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs