quyetnd
quyetnd

Reputation: 589

Diazo: if not for if-path

I'm working on a site with multiple theme base on path:

<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>

...

Now I have a rule that I want to apply if path is not /news. How can I achieve that ?

Upvotes: 3

Views: 983

Answers (2)

Laurence Rowe
Laurence Rowe

Reputation: 2999

I've now added if-not-path to the development version of diazo. See: https://github.com/plone/diazo

Upvotes: 2

Vito
Vito

Reputation: 1201

THe release notes of the brand-new version of diazo:

1.0rc4 - 2011-11-02 Add support for @if-not and @if-not-content. Add support for specifying mode on inclusion rules. Preserve comments preceding/following html tag in theme. Closes #12249. Fix quote_param to always use lxml.etree.XSLT.strparam. Handle rules file without a theme to allow drop or replace content.

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

P.S. the solution could be if-path="not(/news)"

Upvotes: 2

Related Questions