3

我正在一个基于路径的具有多个主题的站点上工作:

<rules if-path="//">
  <theme href="index.html"/>
</rules> 

<rules if-path="/news">
  <theme href="news.html"/>
</rules>

<rules if-path="/Members">
  <theme href="news.html"/>
</rules>

...

现在我有一条规则,如果路径不是 /news,我想应用它。我怎样才能做到这一点?

4

2 回答 2

2

全新重氮版发行说明:

1.0rc4 - 2011-11-02 添加对 @if-not 和 @if-not-content 的支持。添加对包含规则指定模式的支持。在主题中保留 html 标记之前/之后的注释。关闭#12249。修复 quote_param 以始终使用 lxml.etree.XSLT.strparam。处理没有主题的规则文件以允许删除或替换内容。

http://pypi.python.org/pypi/diazo

PS解决方案可能是 if-path="not(/news)"

于 2011-12-14T09:11:33.670 回答
2

我现在添加了 if-not-path 到 diazo 的开发版本。见:https ://github.com/plone/diazo

于 2011-12-15T18:24:22.063 回答