Forums / Setup & design / Alternate Parameter Types for Custom Tools

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.