Forums / General / search by ID for article
thomas BAILLEUL
Friday 27 October 2006 8:12:52 am
Hi,
I'm building a knowledge database with articles searchable by this ID_attribute and I just want to make a toolbar search using this id in the home_page(ID attribute 's article here is not only a integer, it's a string :character + integer)I've checked on :http://ez.no/products/ez_publish/documentation/customization/components/search/custom_search_box
I insert the code below in the pagelayout.tpl
<form action={"/content/advancedsearch/"|ezurl} method="get">
Search by Article_ID: <input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="228" /> <input type="text" name="Content_search_attribute_fulltext_value[]" value="{$search_array_by_class_attribute_id['228']['value']}" /> <input type="submit" value="Search" name="SearchButton">
</form>
with 228 : the ID of the Attribute_ID of the article, but it does not work, (I m not sure that full text is the good code!)Help will be appreciated
Claudia Kosny
Wednesday 01 November 2006 9:27:18 am
Hi Thomas
If you search in just one specific attribute why don't you just use a fetch. Use an attribute filter that filters by attribute 228 and uses 'like' as match type.
Not sure whether this is the best solution but I have not used a custom search box yet so I cannot help you there...
Good luck
Claudia