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.