This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » exclude one specific node in a fetch
expandshrink

exclude one specific node in a fetch

exclude one specific node in a fetch

Tuesday 17 June 2003 2:33:10 pm - 3 replies

Hi.

I have an ordinary fetch to create a menu. Like this:

{let
folders=fetch( 'content', 'list', hash( parent_node_id, 2,
sort_by, array( array( priority, true() ) ),
class_filter_type, include,
class_filter_array, array( 1 ) ) ) }

{/let}

Now, what I want to do is to exclude just one folder from being displayed.

Something like node_filter_type, exclude, node_filter_array,(274) would have been nice happy.gif Emoticon , node 274 being the one I want to exclude from the listing...
Any suggestions?

Regards Bjørn.

Tuesday 17 June 2003 6:30:26 pm

A simple way of achieving this:

Clone the class (and related templates) of the node you want to avoid to show, create the node again as being an instance of this class and then use an exclude for this class (or an include leaving out the one you do not want).

I did something similar to have "special" types of forum messages which behave differently from the normal ones.

--paul

Wednesday 18 June 2003 10:24:23 am

Thanks a lot Paul.

Works like a charm.

Regards Bjørn.

Friday 25 July 2003 2:47:27 pm

Another solution may be using a section within your template
For example if you wish to exclude the folder by knowing it's id

{let folders=fetch( 'content', 'list', hash( parent_node_id, 2,
sort_by, array( array( priority, true() ) ),
class_filter_type, include,
class_filter_array, array( 1 ) ) ) }
{section name=controll show=ne($folders:item.node_id, folder_id_to_exclude)} <--- add this section
{/section}

{/let}

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from