Displaying objects of a specific class

Author Message

Eirik Alfstad Johansen

Monday 29 September 2003 3:09:48 am

Hi,

Wanting to display a list of all the forum messages (class id 7), I wrote the following template code:

{let children=fetch('content','list',hash(class_id,7))}

{section name=Child loop=$children}
{node_view_gui view=line content_node=$Child:item}
{/section}

However, the code generates no output. According to "kernel/content/function_definition.php", "class_id" is a valid parameter, so I can't figure out what I'm doing wrong.

Any ideas?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Adolfo Barragán

Monday 29 September 2003 9:12:27 am

You must specify the parent_node_id (is a required parameter in function_definition.php) and also you must filter by class_id, so your fetch function must be:

... fetch(content, list, hash(parent_node_id, $myNode, class_filter_type, include, class_filter_array, array(7) ) )

Regards
Adolfo Barragan

Eirik Alfstad Johansen

Monday 29 September 2003 11:33:53 pm

Thanks, Adolfo!

With the use of the depth parameter as well, I got it doing what I wanted.

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.