search by ID for article

Author Message

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

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 22:40:43
Script start
Timing: Jan 18 2025 22:40:43
Module start 'layout'
Timing: Jan 18 2025 22:40:43
Module start 'content'
Timing: Jan 18 2025 22:40:43
Module end 'content'
Timing: Jan 18 2025 22:40:43
Script end

Main resources:

Total runtime0.5858 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.0391152.6250
Module start 'layout' 0.00620.0029 741.664139.4297
Module start 'content' 0.00910.5753 781.0938461.6563
Module end 'content' 0.58440.0014 1,242.75008.1797
Script end 0.5858  1,250.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5912160.0002
Check MTime0.00160.2690160.0001
Mysql Total
Database connection0.00060.109610.0006
Mysqli_queries0.538991.9866540.0100
Looping result0.00060.1001520.0000
Template Total0.555294.820.2776
Template load0.00210.362920.0011
Template processing0.553094.402820.2765
Template load and register function0.00030.051710.0003
states
state_id_array0.00070.127510.0007
state_identifier_array0.00160.266120.0008
Override
Cache load0.00180.3023220.0001
Sytem overhead
Fetch class attribute can translate value0.00070.118320.0003
Fetch class attribute name0.00230.397420.0012
XML
Image XML parsing0.00030.058920.0002
class_abstraction
Instantiating content class attribute0.00000.001220.0000
General
dbfile0.00060.0954100.0001
String conversion0.00000.001340.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/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: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs