Forums / General / search by ID for article

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

eZ debug

Timing: Jan 18 2025 19:05:26
Script start
Timing: Jan 18 2025 19:05:26
Module start 'content'
Timing: Jan 18 2025 19:05:27
Module end 'content'
Timing: Jan 18 2025 19:05:27
Script end

Main resources:

Total runtime0.9326 sec
Peak memory usage4,096.0000 KB
Database Queries191

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 587.6875180.8438
Module start 'content' 0.00790.7250 768.5313466.7344
Module end 'content' 0.73290.1996 1,235.2656333.5000
Script end 0.9325  1,568.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.5121210.0002
Check MTime0.00150.1574210.0001
Mysql Total
Database connection0.00170.186810.0017
Mysqli_queries0.835189.54371910.0044
Looping result0.00230.24171890.0000
Template Total0.894095.920.4470
Template load0.00230.250320.0012
Template processing0.891695.603920.4458
Template load and register function0.00020.025610.0002
states
state_id_array0.00150.161210.0015
state_identifier_array0.00130.144020.0007
Override
Cache load0.00200.2096220.0001
Sytem overhead
Fetch class attribute can translate value0.00210.222930.0007
Fetch class attribute name0.00230.242120.0011
XML
Image XML parsing0.00050.050630.0002
class_abstraction
Instantiating content class attribute0.00000.000720.0000
General
dbfile0.02152.3039210.0010
String conversion0.00000.000430.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs