如何在所有页面上禁用 plone4 中的左栏?
我想要我的网站采用 2/3:1/3 布局。
我在 这个站点,但我不知道在哪里应用它(或者如何在主模板中应用)。
@aclark 对于 2/3:1/3,我想要一个宽度为 66% 的内容列和一个宽度为 33% 的右槽列。
I'd like to have a 2/3:1/3 layout for my website.
I found the statment "disable_column_one python:request.set('disable_plone.leftcolumn',1)" on this site, but I don't know where to apply it (or how in the main template).
@aclark With 2/3:1/3 i intend a content column with 66% width and a right-slot column with 33% width.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,您可以尝试删除/隐藏 site/@@manage-portlet 中的所有左栏 portlet,看看是否能得到您想要的结果。如果确实如此,并且您没有站点贡献者会通过添加左侧 portlet 来弄乱您的布局,那么这将是最好的,因为它不涉及自定义。
否则,如果您想使用该链接中给出的方法,您需要确保为您想要禁用该列的每个页面执行 David 提供的 tal:define="..." 。因此,如果您希望在网站的每个页面上禁用它,那么您需要自定义 main_template 并将该 tal:define 放在包含所有其他元素(例如该元素)的顶级元素中。 :-)
顺便说一句,如果您自定义 main_template,则不能使用 David 建议的 metal:fill-slot,因为该插槽是在 main_template 中定义的。
Firstly, you might just try removing/hiding all the left column portlets in your site/@@manage-portlets and see if that gets you what you want. If it does and you don't have site contributors that will mess up your layout by adding left portlets, then that will be best as it involves no customizations.
Otherwise, if you want to use the approach given in that link, you'll need to make sure the tal:define="..." provided by David is executed for every page on which you want the column to be disabled. So if you want it disabled on every page in the site, then you'll need to customize main_template and put that tal:define in a top level element that contains all the other elements, say the element. :-)
BTW, if your customizing main_template, you can't use the metal:fill-slot David suggests as that slot is defined in main_template.
”选项卡在portal_skins 中找到所有main_template 。
您将通过“Find ..
You will find all the main_template inside the portal_skins with tab Find
..