[Zope-CMF] CMF 2.2.0-beta reminder
Charlie Clark
charlie at begeistert.org
Wed Dec 9 10:32:34 EST 2009
Am 02.12.2009, 21:04 Uhr, schrieb Charlie Clark <charlie at begeistert.org>:
> I think that we could work with a sensible default which might be
> overwritable in the aliases?
I can think of two solutions here.
1) Sensible default:
replace
if self.add_view_expr:
lazy_map['url'] = self.add_view_expr_object
lazy_keys.append('url')
else:
lazy_map['url'] = ''
with
if not self.add_view_expr:
url = "string:${folder_url}/++add++%s" % self.getId()
self._setPropValue('add_view_expr', url)
lazy_map['url'] = self.add_view_expr_object
lazy_keys.append('url')
This leaves add_view_expr as an editable property but will create it if
required and it can be edited afterwards. This means you don't need to
worry about typos when creating or copying new portal types, you just have
to make it an empty string.
2) Uneditable TypeInfo method
Apart from transparency I can't see any reason for making this value
editable so it could be implemented as a property doing much the same as
above.
Thoughts?
Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226
More information about the Zope-CMF
mailing list