getSectionFromURL.py 现在在 Plone 4 中已弃用
我在 10/2011 的 Weblion Sprint 中读到:
“然而,根目录下的主题文件夹被证明有些问题,因为 getSectionFromURL.py 现在在 Plone 4 中已被弃用。”
来源: https://weblion.tlt .psu.edu/FogBugz/default.asp?pg=pgWikiDiff&ixWikiPage=944&nRevision1=1
我在 Plone 3 中一直使用这个。有谁知道在 Plone 4 中定位子文件夹的“简单”方法吗?
I was reading from the Weblion Sprint of 10/2011 that:
"However, theming folders below root proved to be somewhat problematic as getSectionFromURL.py is now depreciated in Plone 4."
source: https://weblion.tlt.psu.edu/FogBugz/default.asp?pg=pgWikiDiff&ixWikiPage=944&nRevision1=1
I used this all the time in Plone 3. Does anyone know of an "easy" method to target subfolders in Plone 4?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
节主体类仍然被赋予文件夹 id,只是不再使用 getSectionFromURL 方法来执行此操作,它使用:
并获取 plone_view
The section body class is still given the folder id, it just doesn't use the getSectionFromURL method anymore to do that, it uses:
and to get plone_view
使用默认的 sunburst 主题,您只能获得 body.section-chinese (对于顶级文件夹 plone/chinese/calendar)以及 body 标签上的一些其他类:
如果这对于您正确设置日历样式来说还不够,您需要
a) 编写您自己的 @@plone 视图(针对您的皮肤层)以添加您想要的功能以前在你的getSectionFromURL 方法或
b) 仍然使用旧的 getSectionFromURL 脚本并相应地调整 main_template
with default sunburst theme you only get body.section-chinese (for the top level folder plone/chinese/calendar) and in addition some other classes on the body tag:
if this is not enough information for you to style the calendar properly, you need to either
a) code your own @@plone view (for your skin layer) that adds the functionality you previously had in your getSectionFromURL method or
b) still use your old getSectionFromURL script and adapt the main_template accordingly
您可以做的是根据 http://www.uwosh.edu/ploneprojects/docs/how-tos/how-to-make-plone-generate-.section-css-classes
自定义'getSectionFromURL' (来自 plone_scripts)
将最后一行从: 编辑
为:
行更改为来自定义您的 main_template
然后通过将该
What you can do is customize getSectionFromURL as per http://www.uwosh.edu/ploneprojects/docs/how-tos/how-to-make-plone-generate-.section-css-classes
Customise 'getSectionFromURL' (from plone_scripts)
Edit the last line from:
to:
Then customize your main_template by changing the line
to