Fetch problem... Depth...

Author Message

Nebojsa Eric

Thursday 18 May 2006 3:59:08 am

What am I doing wrong?

{let name=somename children=fetch( content, list, hash
(parent_node_id, 90,
sort_by, array( 'attribute', false(), 'someclass/date' ),
depth, 5,
limit, 5,
class_filter_type, include,
class_filter_array, array( 'someclass' ) )) }

{section loop=$:children}
...
...

This code returns nothing... It should return all objects under the main node 90 until depth 5 of class someclass.

Łukasz Serwatka

Thursday 18 May 2006 4:12:05 am

Depth parameter does not work with "list", try with "tree". List fetched objects till depth 1.

http://ez.no/doc/ez_publish/technical_manual/3_7/reference/modules/content/fetch_functions/tree

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Nebojsa Eric

Thursday 18 May 2006 4:47:29 am

Thank you Lukasz. Tree works.

I`m trying this with list and tree since morning and I finally found what is wrong.

Can`t use .... fetch( content, tree, hash
(parent_node_id...

Syntax must be .... fetch( content, tree, hash(parent_node_id...

"hash" and "(" should be together. Otherwise, not working. There was a problem. :)

Łukasz Serwatka

Thursday 18 May 2006 4:59:22 am

Good to see that works. Always keep debug output enabled when you changing templates. You will save a lot of time ;)

Cheers,
Luke

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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