collection.xdv-为默认主题定义替代主题中断转换 [英] collective.xdv - define an alternative theme breaks transform for default theme
问题描述
我使用的是plone 4.0.1 + Collective.xdv 1.0rc11,我需要使用不同的主题.
我正在尝试按照最近的问题/答案中的中所述进行操作,但是当我插入一个带有条件的新主题时,默认主题完全没有任何变换.以下是我尝试过的一些示例:
<rules css:if-content="body.section-mysection">
<theme href="mysection.html" />
</rules>
此结尾为:
Traceback (innermost last):
Module ZPublisher.Publish, line 132, in publish
Module zope.event, line 23, in notify
Module zope.component.event, line 26, in dispatch
Module zope.component._api, line 138, in subscribers
Module zope.component.registry, line 323, in subscribers
Module zope.interface.adapter, line 575, in subscribers
Module plone.transformchain.zpublisher, line 93, in applyTransformOnSuccess
TypeError
这些:
<theme href="mysection.html" if-path="/mysection/"/>
<theme href="mysection.html" css:if-content="body.section-mysection"/>
对于给定部分的BUT都可以使用,但对于门户的其余部分则完全没有转换.
我试图用<theme href="index.html" />
在rules.xml中指定默认主题(即使它已经注册到@@ xdv-settings中),但没有成功.
我在这里想念什么?
预先感谢, SimO
首先,我会考虑转到plone.app.theming.据我了解,升级/更改相当简单( http ://pypi.python.org/pypi/plone.app.theming#migrating-from-collective-xdv )和病历提供了在Collective.xdv下开发的所有最新和最出色的功能.
第二,我将参考此文档:
听起来您只需要先配置默认主题 ,然后添加一个条件即可在条件匹配时更改相应的部分.附加的匹配主题不应影响默认"(第一个匹配)主题.
I'm using plone 4.0.1 + collective.xdv 1.0rc11 and I need to use different themes.
I'm trying to do as described in a recent question/answer but when I insert a new theme with a condition I get no transform at all for the default theme. Here are some examples of what I tried:
<rules css:if-content="body.section-mysection">
<theme href="mysection.html" />
</rules>
this ends in:
Traceback (innermost last):
Module ZPublisher.Publish, line 132, in publish
Module zope.event, line 23, in notify
Module zope.component.event, line 26, in dispatch
Module zope.component._api, line 138, in subscribers
Module zope.component.registry, line 323, in subscribers
Module zope.interface.adapter, line 575, in subscribers
Module plone.transformchain.zpublisher, line 93, in applyTransformOnSuccess
TypeError
While these:
<theme href="mysection.html" if-path="/mysection/"/>
<theme href="mysection.html" css:if-content="body.section-mysection"/>
both work for the given section BUT for the rest of the portal there is no transform at all.
I tried to specify also the default theme in the rules.xml (even if it's already registered into @@xdv-settings) with <theme href="index.html" />
but got no luck.
What am I missing here?
Thanks in advance, SimO
First, I would consider moving on to plone.app.theming. The upgrade/change is fairly trivial as I understand it (http://pypi.python.org/pypi/plone.app.theming#migrating-from-collective-xdv) and p.a.theming provides all the latest and greatest features that were developed under collective.xdv.
Second, I would reference this document:
It sounds like you just need to configure the default theme first, and then add a condition(s) to change the appropriate section when the condition matches. The additional matched theme should not affect the "default" (first matched) theme.
这篇关于collection.xdv-为默认主题定义替代主题中断转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!