Question

We have the case where the usage of the Products.PloneGlossary glossary should be limited by content-type (which is working out of the box) and by path (glossary should be used only for /one/part/of/my/plone/site). Is there a way to do this?

Was it helpful?

Solution

This seems configurable out of the box. In the configlet make sure "Use glossaries globally for all content?" is unchecked: then put your glossary in the path where you want it usable, and put an empty glossary at the site root.

OTHER TIPS

Well, you could clone the content types and then use those content types only in the section where you want them Glossary-enabled. But that is pretty inelegant, I admit. Someone else may have a better idea about how to modify PloneGlossary to be "placeful" like this.

If you are on Plone 4 you have a body class "portaltype-xxx". Maybe you can customize a little the glossary javascript, to run only if this class in attached at the BODY element, few lines of jQuery:

if (jq('body').hasClass('portaltype-xxx')) { ... }

Or you can change the glossay javascript condition in portal_javascript tool to appear only if object.portal_type=='xxx'.

Good luck

Not sure how PloneGlossary works, but did you try limiting this with permissions? Use 'sharing' tab to assign local roles that allow PloneGlossary on some folder ...

I think the most easy solution is to customize the 'condition' of the registration of the ploneglossary.js file to my own needs. I will extend the schema of the related content-types and give it a new field 'showGlossary'. The condition can the check the value of the object.

This approach does not require any customizations of PloneGlossary and can be accomplished directly inside my policy package.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top