Share » Forums » General » Displaying files in a folder with...

Displaying files in a folder with only a special attribute

Displaying files in a folder with only a special attribute

Tuesday 21 June 2005 6:03:42 am - 2 replies

Modified on Thursday 23 June 2005 7:32:20 am by johann savalle

Author Message

johann savalle

Thursday 23 June 2005 8:44:54 am

mm, okay, I found out the filtering possibilities of fetch, but it doesn't work :s I dunno where I went wrong, here is the code :

{let mylist=fetch(content, tree, hash(..., class_filter_type, 'include',class_filter, array('lesson_text'))}
  {section name=filtering loop=$mylist}
  {node_view_gui view=line content_node=$filtering:item}<br>
  {/section}
{/let

Ɓukasz Serwatka

Thursday 23 June 2005 12:54:49 pm

Hi Johann,

I suggest to enable DebugOutput for development, then you can easly find errors in template syntax for example. Also better is use "var" parameter instead of "name" when you using section. var defines a variablename for the iterator. You should use 'class_filter_array' instead of 'class_filter'

After small corrections your code will be:

{let data=fetch( 'content', 'tree', hash( 'parent_node_id', <node_id>,
                                          'class_filter_type', 'include',
                                          'class_filter_array', array( 'lesson_text' ) ) )}
	{section var=node loop=$data}
  		{node_view_gui view=line content_node=$node}
  	{/section}
{/let}

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

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

36 542 Users on board!

Forums menu