Search code examples
plonexdvdiazo

How to apply a rule to the home page in plone.app.theming diazo rules.xml


I'm trying to create a specific rule for the home page of a site. At the moment I use this rule:

   <before css:theme="#mppeditbar" content="/html/body/*" if-path="/Plone/" href="slideshow/index.htm"/>

It works for localhost, but not with a proxy path in front of Plone.

How could I apply this rule to home page of my site ?


Solution

  • I'm presuming you're using virtual hosting with the proxy. That will change the path from /Plone/ to /. You can include multiple whitespace separated paths in if-path, but with Plone testing the body class is normally the easiest way to do it.

    On second thoughts, I might consider this a bug. With plone.app.theming, includes are rooted at the site root, so I guess if-path="/" should probably match localhost:8080/Plone.