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
|