[Zope-CMF] add Metadata element to existing types

Siegfried Stepke siegfried@stepke.at
Fri, 1 Mar 2002 01:57:34 +0100


Thanks a lot Tim for your help!

As a zope/cmf newbie that goes far beyond my current skills :-(

I'm somewhat astonished to find features in the metadata tool (adding=20
elements) which are for no use and don't lead to the function one would=20
think and need...

I just spent a lot of time in learning and searching for information but=20
have to say that the learning curve is somewhat weird: simple solutions=20
are quite easy - but as soon as you need something specific you get to=20
limits: not because of the technology but the lack of proper information=20
or not so good implementation...

For the actual problem I wonder, if this meta data thing is a bug that=20
will be fixed in the near future (didn't find anything about it in the=20
tracking system) or if this is just like it is (for any or no reason)?

regards,
Siegfried

> Siegfried Stepke wrote:
>=20
> >Hello,
> >
> >although I found lots of information regarding adding new CMF-Types
> with=20
> >their own properties I didn't find anything about adding a totally new
>=20
> >element in the metadata to show up in the full_metadata_edit_form ...
> >
> >I succeeded in creating a new element in the portal_metadata tool; it
>=20
> >shows up there and I can set its default or content-type-specific=20
> >settings. But I don't know what to do to let it show up in the
> documents=20
> >meta-data edit forms...
> >
> >Is this possible? (or are only the standard metadata elements
> supported?)
> >Is this possible for the default portal-types?
> >Do I have to create a new "custom/full_metadata_edit_form"?
> >  Which code would have to be integrated there for a subject-like
> element?
> >
> You need to patch defaultDublinCoreImpl with  new setter and getter
> methods
> and you need to modify the create and bind new __init__ and
> _editMetadata,
> and manage_editMetadata methods
>=20
> plus make a new full_metadata_edit_form
>=20
> I think one thing you need to consider is that these new elements that
> you
> are adding will be added to all CMF content types that have metadata.
>=20
> I have been doing this to extend the metadata to include AGLS
> elements,
> plus some additional ones of our own, which get coalesced into
> Subject.
>=20
> >
> >The goal is to integrate more metadata fields like
> target_audience_level,=20
> >client_category, etc. to be able to create nice topics specific to tha=
t
>=20
> >data and even more...
> >
>=20
>=20
> >
> >I really searched a lot in the docs and archives and found a lot
> similar=20
> >questions but all answers just pointed to new types with properties -
> not=20
> >metadata.
> >
> I have attached the monkey patch we use. basically it is an init method
>=20
> in a product directory.
>=20
> You will note there are some other odd bit's in the code, like the=20
> generation of
> a unique id for every piece of content that has metadata, which get's=20
> regenerated
> if the object is cloned.
>=20
>=20
> Regards
>=20
> Tim
>=20
> >
> >thanks for any help!
> >
> >regards,
> >siegfried

--=20
Petition f=FCr ein softwarepatentfreies Europa http://petition.eurolinux.=
org/