3

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 ?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
toutpt
  • 5,145
  • 5
  • 38
  • 45
  • Is this really a "rules" question? I'd expect some other factor to be involved for why it works on localhost and not the proxy host. But I'm not sure. – aclark May 23 '11 at 12:54
  • as laurence said in its answer it might be considered as a bug. the if-path='/' may work on http://localhost:8080/Plone/ – toutpt May 24 '11 at 13:36

2 Answers2

3

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.

2

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.

toutpt
  • 5,145
  • 5
  • 38
  • 45
Laurence Rowe
  • 2,909
  • 17
  • 20
  • 2
    Hmm. 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 http://localhost:8080/Plone. – Laurence Rowe May 23 '11 at 14:53
  • 1
    I would say a feature. theming can depends on related path (/intranet, /blog, /, ...) making it working for localhost should be nice ! – toutpt May 24 '11 at 09:05