Restringiendo la funcionalidad del glosario a partes particulares de un sitio

StackOverflow https://stackoverflow.com/questions/5480943

  •  14-11-2019
  •  | 
  •  

Pregunta

Tenemos el caso en que el uso de la Productos.ploneglossario El glosario debe serLimitado por tipo de contenido (que está funcionando fuera de la caja) y por ruta (el glosario debe usarse solo para / uno / parte / de / MI / PLONE / SITIO).¿Hay alguna manera de hacer esto?

¿Fue útil?

Solución

Esto parece configurable fuera de la caja.En la CONFIGURAR ¿Asegúrese de "usar glosarios a nivel mundial para todo el contenido?"no está marcado: luego ponga su glosario en el camino donde lo desea utilizable y coloque un glosario vacío en la raíz del sitio.

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top