开发者

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

开发者 https://www.devze.com 2023-03-07 13:53 出处:网络
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/\" hre

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消