Share » Forums » Developer » newbie problems with fetch

newbie problems with fetch

newbie problems with fetch

Saturday 29 July 2006 10:42:19 am - 2 replies

Author Message

Kristian Hole

Saturday 29 July 2006 11:27:04 am

Hi Carlos,

Welcome to the forum!

For some reason eZ publish is picky about having a space between the functions and (. I think you get this error because you have a space between hash and (.

Btw, you can also write this in the "new" template syntax introduced in 3.5. Like this:

{def $children=fetch('content', 'list', hash(
   'parent_node_id', '60',
   'limit', 1,
   'class_filter_type', 'include',
   'class_filter_array', array('Release_middleware')
 ) )
}

<h1>foo</h1>

{foreach $children as $child}
   <h2>bar {$child.name}</h2>
{/foreach}

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Carlos Campderrós

Saturday 29 July 2006 1:00:13 pm

Oh yes, that space was the problem. Thank you very much Kristian : )

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu