Forums / Setup & design / Contain of $show_classidentifiers in new tool

Contain of $show_classidentifiers in new tool

Author Message

Pascal France

Friday 24 October 2008 5:31:22 am

Hi,

I'm creating a new tool wich make use of the parameter $show_classidentifiers
This parameter can contain several classes identifiers.

In the temple of my tootl (toolbar/full/my_tool.tpl) I have this piece of code:

    {let node_list=cond( $treelist_check|eq( 'yes' ),
                             fetch( content, tree, hash( parent_node_id, $parent_node,
                                    limit, $limit,
                                    class_filter_type, include,
                                    class_filter_array, array( $show_classidentifiers ),
                                    sort_by, array( $sort_by, false() ) ) ),
                         fetch( content, list, hash( parent_node_id, $parent_node,
                                limit, $limit,
                                class_filter_type, include,
                                class_filter_array, array( $show_classidentifiers),
                                sort_by, array( $sort_by, false() ) ) ) )}

This code works fine only if $show_classidentifiers contains just 1 class indentifier.

I can display the containt of $show_classidentifiers with this code:

{foreach $show_classidentifiers|explode( ',' ) as $aaaa}
    {concat(''',$aaaa,'',')}
{/foreach}

...wich displays:

'menu_folder', 
'site_article',

but I can't include this code in class_filter_array, array(

Thinks for your help

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

André R.

Friday 24 October 2008 7:23:47 am

it's a string, but it needs to be an array.

class_filter_array, $show_classidentifiers|explode( ',' ),

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Pascal France

Friday 24 October 2008 7:56:00 am

Thinks a lot, André.

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish