如何使用Plone 4在编辑模式下删除portlet? [英] How can I remove portlets in edit mode with Plone 4?
本文介绍了如何使用Plone 4在编辑模式下删除portlet?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我习惯在Plone 3下通过覆盖portal_skin下的base_edit.cpt文件并使列为空来实现此目的:
I'm used to achieve this under Plone 3 by override base_edit.cpt file under portal_skin and make columns empty:
<metal:head fill-slot="column_one_slot"></metal:head>
<metal:head fill-slot="column_two_slot"></metal:head>
我试图用Plone4来实现这一点,结果却很奇怪:我有两个空列,并且编辑模式没有伸展(停留在页面中间).
I have tried to achieve this with Plone4 and the result is quite weird: I have two empty columns and the edit mode doesn't stretch (stay in the middle of the page).
推荐答案
在Plone 4中,您可以通过在请求上设置几个变量来禁用列:
In Plone 4 you can disable the columns by setting a couple variables on the request:
<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);"/>
这篇关于如何使用Plone 4在编辑模式下删除portlet?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文