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

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

eZ debug

Timing: Jan 19 2025 07:16:22
Script start
Timing: Jan 19 2025 07:16:22
Module start 'layout'
Timing: Jan 19 2025 07:16:22
Module start 'content'
Timing: Jan 19 2025 07:16:22
Module end 'content'
Timing: Jan 19 2025 07:16:22
Script end

Main resources:

Total runtime0.0135 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.2891152.6406
Module start 'layout' 0.00550.0023 741.929739.4766
Module start 'content' 0.00780.0042 781.406389.4922
Module end 'content' 0.01200.0015 870.898434.3047
Script end 0.0135  905.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002115.8323140.0002
Check MTime0.00107.5826140.0001
Mysql Total
Database connection0.00096.425010.0009
Mysqli_queries0.002216.119930.0007
Looping result0.00000.104110.0000
Template Total0.00129.110.0012
Template load0.00074.958610.0007
Template processing0.00064.071010.0006
Override
Cache load0.00043.211610.0004
General
dbfile0.00032.269380.0000
String conversion0.00000.079440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs