Tagging your content using custom content types
This How-to applies to:
Any version.
This How-to is intended for:
Integrators, Customizers
Plone has a built-in mechanism for tagging content-types called Keywords. When editing standard Plone content, you’ll find Keywords on the “properties” tab.
You can also add this field to your own new Archetype content-types by adding a “subject” field like this:
LinesField(Or if you’re generating your content via ArchGenXML (see ArchGenXML Introduction), add a field called “subject” of the “lines” type, and make sure you use these tagged values (screenshot of tagged values for “subject” field in ArgoUML):
name='subject',
widget=KeywordWidget(
label="Keywords",
label_msgid='myconent_label_subject',
i18n_domain=' myconent ',
),
accessor="Subject",
searchable=True,
multiValued=1
),

Moving the Keyword field for existing content types
For some content-types, Keywords should be front-and-center and not out-of-sight in the Properties tab. If you're creating your own content-type, you just need to add the field as explained above and you're done.If you'd like to modify an existing content-type (e.g. create a ConferenceNewsItem based on NewsItem):
- Using ArgoUML, you can "subclass" the default content-types. See How to subclass an ATContentType in 7 Minutes
- In the generated Archetype code, you'll see the "###code-section after-schema". Just modify the schema by adding code in that section (so that regenerating the type won't overwrite). Also see Swapping fields around in an ATContentTypes subclass
##code-section after-schema #fill in your manual code here
# move subject field to main form (default schemata), and put it after the existing 'text' field
ConferenceNewsItem_schema['subject'].schemata='default'
ConferenceNewsItem_schema.moveField('subject', after='text')
##/code-section after-schema
Further Thoughts - Connecting with External Web 2.0 Services
Now that you've tagged your Plone content, you can use those same tags to pull in data from external Web 2.0 services - such as blogs from Technorati, products from eBay, images from Flickr, etc. For an example, see Mashups in Plone: Leveraging Web 2.0Related
other search terms: mashup, mashups, tag, tags, ploneconf2006
Customized NewsItem with Keywords