Results visualizzation

Author Message

Alessandro Romanin

Wednesday 10 June 2009 3:53:42 am

Hello,
I've already installed ez Find extension and it works well, but I'm still a newbie.
I created a new override to fill with a custom search form.
The result should be all documents containing the word "pub" and having the content object attribute "pub/town" with a value of the searching town name.
I wrote the following code to fetch and show data; I can't understand which part is failed because nothing is shown.

{def $filterhash=hash( 'query', 'pub',
				'filter', 'pub/town:$town',
                        'sort_by', hash( 'pub/name', 'asc' )}

{$seeker = fetch( 'ezfind', 'search', $filterhash)}
<br />
{foreach $seeker as $pub}
        <div class="attribute-title">
            <h2 style="margin-top: 0.5em; margin-bottom: 0.25em">
                <a href="/ezpublish/index.php/en/Pub/{$pub.name}">{$pub.name}</a>
            </h2>
        </div>
<br />
{/foreach}

Can anybody help me, please?

Thanks in advance

Max Keil

Thursday 25 June 2009 3:28:35 pm

Hi,

ezfind/search returns an array with Search Information, not only the nodes. You should loop over $seeker.SearchResult to get your informations. You can also dump this array with:

{$seeker|attribute(show,2)} to see al the provided variables .

Mit freundlichen Grüßen
Best regards

Max Keil

____________________________________________________________
eZ Publish Gold Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

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 31 2025 00:23:29
Script start
Timing: Jan 31 2025 00:23:29
Module start 'layout'
Timing: Jan 31 2025 00:23:29
Module start 'content'
Timing: Jan 31 2025 00:23:30
Module end 'content'
Timing: Jan 31 2025 00:23:30
Script end

Main resources:

Total runtime0.9189 sec
Peak memory usage8,192.0000 KB
Database Queries56

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.1563151.2109
Module start 'layout' 0.00480.0047 739.3672220.6875
Module start 'content' 0.00950.9087 960.05474,433.2188
Module end 'content' 0.91820.0007 5,393.27347.8516
Script end 0.9189  5,401.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3980160.0002
Check MTime0.00140.1507160.0001
Mysql Total
Database connection0.00080.086310.0008
Mysqli_queries0.825589.8335560.0147
Looping result0.00050.0582540.0000
Template Total0.844691.920.4223
Template load0.00220.240520.0011
Template processing0.842491.670320.4212
Template load and register function0.00130.136910.0013
states
state_id_array0.00300.323410.0030
state_identifier_array0.00190.211620.0010
Override
Cache load0.00180.2010160.0001
Sytem overhead
Fetch class attribute can translate value0.00210.233720.0011
Fetch class attribute name0.00160.176230.0005
XML
Image XML parsing0.00200.221320.0010
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.01371.4963160.0009
String conversion0.00000.000640.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
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs