Mike Hyde wrote:
> If you only need to make changes to the style sheet on a per-folder
> basis, here is a method that I used. the advantage of this approach is
> that all the different styles are still in one style-sheet, and there
> are no conditions in the registry. This means that all the
> style-caching will still work, meaning there should be very little
> slowdown using this approach.
The ResourceRegistries is now cacheable, thanks to Florian Schultze.
So you can now play with conditions without affecting plone perfs.
Changes are in the svn trunk.
Personaly I prefer when I can avoid modifying plone templates and
scripts for further maintenance.
Your solution is interesting though.
Thx,
David
>
> However, if your local styles involve more than just css changes (i.e.
> you have made changes to templates as well) then as far as I know, you
> are still going to have to use access rules.
>
> Hope this helps
> Mike
>
> ------------------------------------------------------------------------
>
> In order to allow customised styles to be applied to any folder or sub
> folders, I ended up doing the following:
>
> * Customise 'getSectionFromURL' (from plone_scripts)
> * Edit the last line from:
> return "section-" + contentPath[0]
> to:
> return " ".join(["section-" + "-".join(contentPath[:d+1]) for d in
> range(len(contentPath))])
>
> This expands the code that creates the "section-members" class attribute
> in the body tag. It now adds a class for each folder in the path.
>
> E.g. Imagine you have a folder structure that goes:
> /departments/marketing/news
>
> The body tag now has the following class attributes:
> section-departments
> section-departments-marketing
> section-departments-marketing-news
>
> So in ploneCustom.css, you can go:
> .section-departments-marketing p { color: red }
>
> to turn all paragraphs red in /departments/marketing and below
>
> and then you could also go:
> .section-departments-marketing-news p { color: green }
>
> to override all the paragraphs to green in /departments/marketing/news
>
>
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit
http://www.jboss.com/services/certification for more information
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users