collection.xdv

编程入门 行业动态 更新时间:2024-10-23 08:29:10
本文介绍了collection.xdv-为默认主题定义替代主题中断转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用的是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 zopeponent.event, line 26, in dispatch Module zopeponent._api, line 138, in subscribers Module zopeponent.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/pypi/plone.app.theming#migrating-from-collective-xdv )和病历提供了在Collective.xdv下开发的所有最新和最出色的功能.

第二,我将参考此文档:

  • diazo/advanced.html#multiple-conditional-themes

听起来您只需要先配置默认主题 ,然后添加一个条件即可在条件匹配时更改相应的部分.附加的匹配主题不应影响默认"(第一个匹配)主题.

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 zopeponent.event, line 26, in dispatch Module zopeponent._api, line 138, in subscribers Module zopeponent.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 (pypi.python/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:

  • diazo/advanced.html#multiple-conditional-themes

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

本文发布于:2023-07-17 03:34:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1129006.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:collection   xdv

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!