Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide navigation portlet after logout?

Tags:

plone

How to hide a navigation portlet after logging out? What I exactly want is, if a logged-in admin visits a site, the navigation portlet should appear and be visible to him until he logs out from the plone site. But if a normal user visits the plone site, the portlet should not appear.

like image 811
Nirmala Sudhir Avatar asked Dec 25 '22 20:12

Nirmala Sudhir


1 Answers

A nice feature of Plone is the option to assign portlets not only to locations, but also to contenttypes and groups. To solve your request, simply assign the portlet to the group 'Administrators'.

To do that, go to your Plonesite's controlpanel, click 'Users and Groups', click on green tab 'Groups', click on 'Administrators', click on the tab 'Group portlets', add a portlet.

To reproduce this programtically, use Genericsetup (export portlets.xml of the site and include the relevant parts in your product).

For completeness: Similiar for assigning portlets to a contenttype, you go to the controlpanel, click 'Types', choose the wanted type (f.e. 'Event') of the dropdownlist and click on 'Manage portlets assigned to this content type', assign portlet. Progragramtically reproducable via exporting 'Types' and including it to your products.

like image 154
Ida Avatar answered Jan 31 '23 01:01

Ida