Re: Modify attribute based on id
Jean Jordaan <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.user |
|---|---|
| Message-ID | <CAJqnznArr74-n1EhkfFmLraYs=P2_bY2yXGRVpr1jWzGbwOpkQ@mail.gmail.com> |
On Wed, Aug 20, 2014 at 7:03 AM, Chuck Theobald <[email protected]> wrote: > I would like to selectively apply a css class definition to an element > based on the path. I don't think you need XSL for this. Looking at a random page on a Plone site, I see these classes applied to the body tag: <body dir="ltr" class="template-event_view portaltype-event site-mysite section-events icons-on context-announcement-first-international-meeting parent-events" style="position: relative; min-height: 100%; top: 0px;"> So if you can identify the page(s) you want to style based on the section, context, or parent, then you can just write your CSS rule to depend on e.g. /* styles for two-column display */ .section-research { margin: ... } (In that example I assumed that you added a toplevel "research" section.) -- jean . .. .... //\\\oo///\\ ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/