Hiding columns, left or right portlets in Plone
Nice tips from Plone User lists howto hide left or right portlets.
Hiding columns, left or right portlets in Plone
Dave Zoltok asked:
I've noticed in a few places (such as the Preferences page) that the right portlets are not displayed. I found the code to do that, but I also noticed that even though no portlets show up, the space where they would be is still present. Is there a way to hide not only the portlets, but the entire column, in a page template?Alec Mitchell answered:
Kamal Gill answered:<?xml:namespace prefix = metal />
<metal:override fill-slot="column_two_slot">
</metal:override>Which is what is done for prefs_main_template.pt, seems to work fine for that here, it even gets rid of the entirely (or the div if you are using tableless).
You could use CSS to hide the column altogether by including something similar to the following in your page template as an inline style.
#portal-column-two { display: none; }
Or, you could use the Properties tab in the ZMI. Navigate to your page template in the ZMI, click the Properties tab, add a new property named right_slots (type = lines) with an empty value. Note: You could also use the latter as a method to hide the left or right column on a folder-by-folder basis.
tags: Plone
Simple method for a single template
<td metal:fill-slot="column_two_slot" />
</tal:block>