How to remove portlets in edit mode using Plone 4?

I use for this in Plone 3 to redefine the base_edit.cpt file in the portal_skin file and make the columns empty:

<metal:head fill-slot="column_one_slot"></metal:head> <metal:head fill-slot="column_two_slot"></metal:head> 

I tried to achieve this using Plone4, and the result is rather strange: I have two empty columns and the editing mode does not stretch (stay in the middle of the page).

+4
source share
2 answers

In Plone 4, you can disable columns by setting a couple of variables in the query:

 <metal:override fill-slot="top_slot" tal:define="disable_column_one python:request.set('disable_plone.leftcolumn',1); disable_column_two python:request.set('disable_plone.rightcolumn',1);"/> 
+9
source

I think that since plone 3 used tables as the main structure of the page, while plone 4 uses sunburst, which uses Deco GS.

Probably the fastest way (and not way: P) is to force the width of the columns via CSS (you can click CSS using style_slot in base_edit.cpt).

Anyway, I see in

 ./plonetheme.sunburst-1.0.3-py2.6.egg/plonetheme/sunburst/skins/sunburst_templates/main_template.pt 

that the class / width columns should be computed by getColumnsClass sunburst_view . This is probably a bit of a buggy (I did not debug it, though).

NTN

0
source

All Articles