[Zope] anybody written a "tab folder"/<dtml-tab> feature?
Mark James Adams
mark@raysend.com
Wed, 1 Aug 2001 09:59:30 -0400
On Wednesday, August 1, 2001, at 05:30 AM, "Peter Bengtsson"
<mail@peterbe.com> wrote:
> the ZMI doesn't have a tab called "widget". Not in any of the 2.2.x or
> 2.3.x
> or 2.4.x
> Or in other words, I've never seen one.
>
>> The zope management interface has a nice tab folder "widget". Sure
>> would
>> be nice if there was a <dtml-tab>
>
> What would a <dtml-tab> do?
> Writing DTML tags is easy if you search for the How-Tos on it and
> there's
> plenty of examples to download and follow.
>
I believe Albert is thinking of the management tabs in general. By
widget he means a general method of making such an interface feature.
The management tabs are generated from the manage_options tuple that is
defined in Python ZClasses (they are done automatically in ZClasses made
in the ZMI though the View tab).
For example, in one of my Python classes:
manage_options = (
{'label': 'Meta', 'action': 'manage_metaInfoEditForm'},
{'label': 'View', 'action': 'index_html'},
)
If I call <dtml-var manage_tabs> in one of my management screen, then
the contents of mange_options will be rendered as tabs. I don't know if
there is any way to use <dtml-var manage_tabs> outside of the management
screens. Obviously manage_tabs only needs a tuple of dictionaries to
render the tabs, so there may be a way to make it render an arbitrary
tuple, not just manage_options.
Hope this helps.
--
Mark James Adams
mark@raysend.com