문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top