Package: collective.classifiers
IntroductionThis contains two dexterity behaviors, vocabularies and indexers for
two ‘taxonomy-like’ fields:classifiers_themes(e.g.Air,Air > Quality,Air >
Pollution,Water)classifiers_categories(e.g.Report,Project,Project
> Management)Use caseYou want to show some information on your website and make it easy to
find it.  You have reports about air or about water.  You also have
projects about those themes or specifically about air quality.  Some
projects are about both air and water.  Some reports are specifically
for management and some are more technical.You want to be able to search all projects that are about the theme
air, whether this is about air in general or specifically about air
quality.  You also want to search on air quality in particular,
without finding the air pollution report.How do you put this in a Plone Site?  A traditional way would be to
make two new content types: Report and Project.  You add a checkbox or
radio button to both types so you can mark them as technical or for
management.  You use the tags field to add anair qualitytag or
other tags for the themes.This can work, but it has a few downsides:You need two new content types, even though apart from the checkbox
there is no difference between this and a standard page or maybe a
folder.Not all tags are themes.  Editors may use tags for anything.  You
may have an add-on or some custom code that already uses tags, for
example to mark an item for showing up on the home page or in a
collection.  So the theme tags get lost in the other tags.Alternatively, instead of adding two new content types, you can use
tags to tag a standard page as a project or report and as technical or
for management.  This clutters up the tags even more.To mark an item as a certain theme, you can also use a taxonomy, for
examplecollective.taxonomy.  This is more flexible than this
package, but it may be overkill, trying to do too much.Instead,collective.classifiersbasically adds two fields, which
get their data from two dictionaries in the Plone configuration
registry.Installation and usageJust addcollective.classifiersto the eggs of your zope instance
in your buildout config, run buildout, and start the zope instance.
Go to the Plone Add-ons control panel of your website.  First activate
Dexterity content types if you have not done so already.  Then activatecollective.classifiers.Go to theClassifiers Settingscontrol panel, which simply accesses
the Plone configuration registry with a filter oncollective.classifiers.  You can edit the data there to create
categories and themes that fit your situation.  If editing does not
work because you get validation errors, please see theDependenciessection.Let’s say you add this data:CategoryReport, with sub categoriesManagementandTechnical.CategoryProduct, with no sub categories except a white space
character.  This is a trick to allow a top level category without
any sub categories, as the top level may be enough.  The same trick
can be done with themes.ThemeAir, with sub themesQualityandPollution.ThemeWater, with sub themesRainandRivers.Go to a type on the Dexterity types control panel, for example a Page.
Activate the categories classifiers and/or the themes classifiers
behavior.You can now create or edit a Page and select multiple categories and
themes.  With the above data, you have these categories to choose from:ReportReport > ManagementReport > TechnicalProductYou will have these themes:AirAir > QualityAir > PollutionWaterWater > RainWater > RiversLet’s say you pick as categoryReport > Managementand you pick
two themes:AirandWater > Rain.The categories and themes are shown on the default view of the page,
but what is more interesting is that you can search for them in a
Collection.  In the edit form of a Collection you can select
Classifier Categories and Classifier Themes.  If you select as
category eitherReportorReport > Management, the page will
be found.  If you select as theme eitherAir,WaterorWater
> Rain, the page will be found.DependenciesThis is tested on Plone 4.3.2 with one version updated to a newer
release: plone.app.z3cform 0.7.5.  This should be the default in a
future Plone 4.3.3 release.  If you use an older plone.app.z3cform
release, editing the dictionaries through the web is not possible.
You would need to update the dictionaries by importing aregistry.xmlwith your wanted settings then.  Seecollective/classifiers/profiles/testfixture/registry.xmlfor an
example.Should work with Plone 4.2 as well, with the same remark about not
being able to edit the dictionaries through the web.SponsorshipWork on collective.classifiers has been made possible by The Flemish
Environment Agency or VMM. Seehttp://www.vmm.be. VMM operates as an agency of
the Flemish government for a better environment in Flanders. Flanders is one of
the three Belgian regions with its own government, parliament and
administration. The other two are the Brussels-Capital Region and the Walloon
Region.TestingThis package is tested with Travis:Changelog0.4.1 (2014-04-07)Nothing changed yet.0.4 (2014-03-05)Add upgrade step to fix the values currently in the catalog.
[maurits]Do not let themes and categories end up in the catalog index when
the behavior is not activated for a portal_type.
[maurits]0.3 (2014-02-24)Handle case where values is None.
[maurits]0.2 (2014-02-24)Make values not required.  Until now you could fake an empty values
list by typing a space as value.  In some circumstances, next time
you edited the configuration, you would need to do this again
because the space was stripped.
[maurits]0.1 (2013-11-09)Initial release