Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to specify a wildcard in Diazo <notheme if-path=… rule?

Tags:

plone

diazo

If not, can I do this with inline XSLT? And if so, how?

I assume it's not possible, based on a search for "wildcard" in the Diazo docs but I wanted to make sure I'm not missing something.

This would be particularly handy in allowing the ZMI to pass through unthemed.

E.g.

<notheme if-path="manage*" />
<notheme if-path="portal*" />
like image 741
aclark Avatar asked Jul 25 '11 11:07

aclark


2 Answers

We tried regex matching with collective.xdv, but it didn't work too well - just think about what happens when someone creates the page named "management". Even manage_* ends up including the manage_translations page, which should be themed. Our current best practice is to use:

<rules css:if-content="#visual-portal-wrapper">

I hope we'll be able to find a way to patch in the X-Theme-Disabled response.setHeader to the relevant bits of DTML (and a few ZPTs) in the ZMI.

like image 136
Laurence Rowe Avatar answered Sep 20 '22 21:09

Laurence Rowe


You can do this with an XPath expression :

<notheme if="contains($path, 'manage')"/>

But be careful though ;-)

like image 40
Laurent Lasudry Avatar answered Sep 16 '22 21:09

Laurent Lasudry