Kaustav Bhattacharya
|
Monday 15 December 2008 12:13:09 pm
I've got an eZ 4.0.1 site on which I'm using an eZ Blog. I want to display the blog title and a short excerpt of each blog entry which matches a particular tag. So for example I have posted a blog entry about "Fred Smith" and on the "profile page" of Fred Smith I want to pull out the titles of all the blogs that were ever written about Fred Smith and tagged with Fred Smith in my eZ blog. So far my code look like the following, but the search returns zero research. Any advice? {attribute_view_gui attribute=$node.object.data_map.center_column}
{def $thisnode=$node.node_id}
{def $nodes=fetch( 'content', 'node',
hash( 'node_id', $thisnode, limit, '9'))}
{def $name = $nodes.data_map.name.value}
<h1>Recent posts about {$name}</h1>
{def $search=fetch( 'content', 'search',
hash( 'text', '$name',
'class_id', array( '13', '19', '20' ) ) )}
The search returned {$search.SearchCount} matches. <br />
{foreach $search.SearchResult as $matched_node}
{$matched_node.name|wash} <br />
{/foreach}
|