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="#mpped开发者_如何学Citbar" 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 ?
Something like css:if-content="body.section-front-page"
should do the trick. If you base your rule conditions on the actual content, you can even check for single elements like e.g. css:if-content="#frontpage-scrollable
for switching to a dedicated front page theme template.
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.
精彩评论