CMFPublicator tool can be used to another purposes.
The default is a unique
portal_publicator object in
the root site, that control and manage all boxes.
The feature that doesn't allow you create another
object in other site nodes, or another object type
with this object ID, is the inherited class
defined in the
PublicatorTool.py module. It is used by default
for security prevention.
But, in some cases the portal needs manage boxes in other site nodes, given different content control in diferent site levels.
CMFPublicator can be used in this case too. To do this, just
PublicatorTool.py module and change the constant
ROOT_SITE_ONLY value to
0 (now it's default value). Save
and refresh the
CMFPublicator product or restart Zope.
Now you can create more than one
in other site nodes by selecting the default dropdown box,
ZMI, and choosing
CMF Publicator Tools. Or simply copying
portal_publicator from the root site, and paste in other
One last thing. Go to
portal_publicator, in root site
and click the
Actions tab. Here we have two actions pre-programated,
but only the first has the check box
Unckeck it, check the last checkbox action
Visible? and save.
This is because the first action provide a
in user actions bar, to control the root
and now we need control the
portal_publicator present in each
site node. Then this last action appears in folder tabs, if it
Plone 2 doesn't use the default user actions bar to control add-ons.
If you want, uncheck all CMFPublicator actions and create one action
portal_controlpanel object, but only in default uses,
because this special case need control per node.
Be careful when using this feature. If you have a
foo box on the
portal_publicator root site and you create a new portal_publicator
bar node and your portlet invokes
then an exception will be raised when request this node because this
new portal_publicator don't have the
foo box. To prevent this fail
portal/portal_publicator getting the portal_publicator root
In some cases, you need get other specific metadata to manipulate in a box template. The default CMFPublicator stored metadata is showed in Stored items help page.
CMFPublicator has a Script Python called
get customized metadatas. This script can be customized in the
portal_skins/publicator and must return a dictionary with
getItemInfo default script, return the
where the object is contained, naming it
Group(it's just an
example). But the Group metadata is refered in an example
portlet, see Example
help page. Delete this if you think you'll not use it, but you can
leave it returning
Group as one more key of dictionary.