Forums / General / Fetching objects relating to current object. / Comment31007
Paul Borgermans
Thursday 06 January 2005 10:46:51 am
Hi Gabriel,
The result of the search includes a search count, some other goodies like search words omitted and the searchresults as a sub-array. You should use it like the following:
{let mysearch=fetch( content, search, hash( text, 'Spain') )} {*discover some more: uncomment the line below*} {*$mysearch|attribute(show)*} {*end discover *} {section loop=$mysearch.SearchResult var=result} <a href={$result.main_node.url_alias|ezurl}>{$result.name}</a><br /> {/section} {/let}
Also notice the better use of <b>var=</b> instead of the swampy section name spaces.
hth
-paul
eZ Publish, eZ Find, Solr expert consulting and training http://twitter.com/paulborgermans