You are here: Home / Blog / How to add portlet widgets to eea.facetednavigation

How to add portlet widgets to eea.facetednavigation

Posted by Fulvio Casali at Jun 02, 2015 12:21 PM |
Filed under:
If we want to add some static text anywhere on a Faceted Navigation page, eea.facetednavigation allows us to use portlets as widgets in any of the widget containers. Here is how. (Requires ZMI access).

You may want to use an existing portlet, but if you want to create an ad-hoc portlet, you can do it in the ZMI:

  • Go to portal_skins
  • Go into the custom folder
  • Select Page template from the Add dropdown menu, top right
  • Give it a simple name - I will refer to this name below as your_portlet_id
  • Paste in the following code:

 

<html>
<body>
<div metal:define-macro="portlet">
<h1>Foo Bar!</h1>
</div>
</body>
</html>

 

Now go back to the site:

  • On your faceted navigation page, go to the Faceted Criteria tab
  • In the Top widgets section, click the + button
  • In the Add widget dialog, select the type Plone portlet
  • Give it a friendly title (but this would only be shown to you, not to the end user)
  • Under portlet macro, enter:  your_portlet_id/macros/portlet, (replacing your_portlet_id with the name you chose earlier in portal_skins/custom)

 

Now you can go back in the ZMI portal_skins/custom, and use any HTML you want.

 

 

Filed under: