Alternate Parameter Types for Custom Tools

Author Message

Eric Weik

Sunday 12 December 2004 9:18:05 pm

I recently added some new tools to a toolbar list using the method described here:
http://www.ez.no/ez_publish/documentation/customization/components/toolbars/adding_new_tools_to_toolbar_list

Worked like a charm. However, I cannot figure out how to use alternate types for my tool parameters. For example, the "node_list" tool that comes with 3.4/3.5 has a boolean value ("Fetch whole tree"), some object browsers ("Item source" and "Show in subtree"), etc.

I'm assuming this result can be accomplished through an admin override template, but I cannot figure out which one(s). Any tips on this?

Thanks,
Eric

Eric Weik

Tuesday 14 December 2004 11:24:51 am

Well, I'll take a stab at answering my own question. :-)

In looking at /design/toolbar.tpl, it looks like tool parameters can have 6 types, the default (a simple text field), note, classidentifier, classidentifiers, and subtree. The type is specified by ending the parameter name with _type the toolbar override, like so:

[Tool_exampletool]
parameter1_node=
parameter2_classidentifier=
parameter3_classidentifiers=
parameter4_subtree=
parameter5_check=yes

<i>As of 3.5rc2, if you do not set parameter5_check to default as either yes or no, it will not render as a checkbox. </i>

Presumably you can add more types (i.e. "textarea", etc.) by overriding /design/toolbar.tpl for your admin siteaccess. I personally have not had any success with this method, but it is likely due to my own relative inexperience with the override system.

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 31 2025 01:25:35
Script start
Timing: Jan 31 2025 01:25:35
Module start 'layout'
Timing: Jan 31 2025 01:25:35
Module start 'content'
Timing: Jan 31 2025 01:25:35
Module end 'content'
Timing: Jan 31 2025 01:25:35
Script end

Main resources:

Total runtime0.0244 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.2656151.2266
Module start 'layout' 0.00600.0043 739.4922220.7188
Module start 'content' 0.01040.0124 960.2109997.9609
Module end 'content' 0.02270.0016 1,958.171929.9922
Script end 0.0244  1,988.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002710.9412140.0002
Check MTime0.00114.5471140.0001
Mysql Total
Database connection0.00103.954910.0010
Mysqli_queries0.002811.288130.0009
Looping result0.00000.078210.0000
Template Total0.00124.710.0012
Template load0.00093.521010.0009
Template processing0.00031.192210.0003
Override
Cache load0.00062.475310.0006
General
dbfile0.00031.201080.0000
String conversion0.00000.040140.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