Hide portlet for certain portal_types or views


we are running Plone 5.2.0 using Python 3.6.8. We've added the Navigation-Portlet on the site root so it automatically is visible on every subfolder and other Container-like Dextery types recursively. We created many new types for our addon and for some types the Navigation should not be rendered. It seems not possible to define types where the Portlet should not be rendered or to exclude the portlet in certain views. The portlet manager (/manage-portlets) does not show inherited portlets so that we could hide them manually.
What's the correct way to hide inherited portlets for certain types or views?

I found things like this: https://docs.plone.org/develop/plone/functionality/portlets.html#disabling-right-or-left-columns-in-a-view-or-template
But many of the links there show an 404 which is unfortunate and I don't know what disable_plone.leftcolumn and disable_plone.rightcolumn exactly does. The explanation is just to short for me to understand it. What is the left and what is the right column? I thought there are portlet managers and portlets but not left and right columns. I don't get it.

I hope you can enlighten me here. Thanks a lot!


there is one possibility to change Portlets for types at the content-controlpanel, but after I just checked it, it just can add portlets to the choosen type - but I never really worked with this before!

The disable_plone.leftcolumn and disable_plone.rightcolumn can be used for example in own views/templates to disable the portlet columns on the right side or the left side of the content. (https://docs.plone.org/develop/plone/functionality/portlets.html). This would disable all portlets in the named column/on the namend side.

But maybe this will be what you need: https://docs.plone.org/develop/plone/functionality/portlets.html#disabling-right-or-left-columns-on-a-context. Sadly I never tested something like this before and can't give further information or tipps in this case.

Hm, that does not help me. I already found that idea before.

What about the other way around? Can I tell my content types which portlets should automatically be added when they are created? But then the portlets should not be inherited from their children. Maybe somewhere in profiles/default/portlets.xml or anything similar?

I found something on a german page: https://www.plone-entwicklerhandbuch.de/erscheinungsbild/portlets-aendern-zuweisen-blockieren-und-entfernen

There it says you can use the portlet.xml to hide or add portlets - also in a specified context.

The very last code-snippet on the page for example will hide all portlets in the context "news". May be this can help? I would recommend to look at portlet.xml files to learn how the plone 5 notation is. The file in plone.app.event has some examples for assignment and portlet (also with context/interfaces).

This looks nice. Thank you. Fortunately German is my mother tongue.

The control panel lets you block 'everything' and have default for a certain content type.

left and right columns can be hidden with a diazo rule.

Register for just a specific browser layer also should work.