[Zope3-dev] Re: RFC: Zope.org - AdaptersForMenuItems

Philipp von Weitershausen philipp at weitershausen.de
Tue Jan 13 06:06:47 EST 2004


Jim,

> Really, I'd rather not mix up menu item ordering with this proposal.
> We will keep the ordering we have now, for better or worse.  When we
> come up with a good way to control ordering, we'll implement it,
> but we're having a lot of trouble doing that and I don't want to
> hold up this work.

Sounds like a good idea.

> We'll use an order variable as you suggest and we'll allow this to be
> overridden with zcml. Note, however, that interface specificity will
> take precedense over order. That is, items will be sorted first by
> specificity and then by order.

And yet another tongue twister in Zope 3 jargon :).

>> 4. It'd be cool if you could use the standard schema field fields such 
>> as title and description instead of __doc__. This way, it'd be very 
>> easy to turn those schemas into web forms for local menus.
> 
> Sorry, you lost me on this one.

Ah, well, it's not a big deal really. It's just that you write::

            title = TextLine(
                __doc__ =
                """Menu item title

                The title provides the basic label for the menu item.
                """,
                required=True.
                )

while I would prefer the schema convention::

            title = TextLine(
                title=u"Menu item title",
                description=u"""The title provides the basic label
                for the menu item.""",
                required=True.
                )

A field defined like this (not to forget the missing i18n) can be used 
to generated web forms for some UI interface.

Philipp





More information about the Zope3-dev mailing list