You are here: Home Zope products SilvaStylesheets

SilvaStylesheets (2.1)

by Olha Pelishok last modified 2009-01-20
Released on 2007-12-23 by Andrew Altepet under Zope Public License (ZPL) available for All platforms.
Software development stage: stable
This product provides a Silva Stylesheet asset to the SMI. Stylesheets are editable through the SMI. The styles are split up into Style Sets, which are logical groupings of styles. Each Style Set contains common CSS selectors as found in Silva's frontend.css, as well as a few others selectors.

This product opens up the styling of Silva sites to Authors+, within the SMI. For large companies like universities that have one basic look, and which allow individual departments to customize the look of the content of their site, this a perfect product.

Managers and Chief Editors can also supply custom styles. Each custom style selector automatically has the css prefix prepended.

No longer do you need do site managers need to update stylesheets for the departments.

Installing Silva Stylesheets into the public layout

To actually take advantage of this product, you need to configure your layout template to include a silva stylesheet if it exists. One one Silva Stylesheet is allowed per container, and it's id is local-styles.css. So, In the override section of your layout template, just include the following:

"Under the Hood"

SilvaStylesheets uses Formulator Forms to divide up the CSS selectors into Style Sets and expose them in the SMI. If you find that SilvaStylesheets is missing selectors you would like to have exposed in the SMI, you can either add those selectors for an existing Style Set, or create a new fs-based formulator form.

For those who aren't that familiar with how Silva's layouts work, the formulator forms, along with the rest of the SMI code for this product, are located in SilvaStylesheets/view/edit/Asset/Stylesheet

To add a new Style Set, all you need to do is place a formulator form in this directory. It will automatically appear in the edit tab of Silva Stylesheets. You do need to make one change to the page template located in this directory. The first tag in this file retrieves the formulator form for this styleset. For security reasons, it only allows specific filenames to be selected. On the line that defines styles_form, i.e.:

styles_form python:style_set in (tables,paragraphs,...) and getattr(view,style_set) or nothing"

Add the name of your form (excluding the .form extension!) to the list. So, if you're adding a Style Set called lists, the above list would look like (tables,paragraphs,lists)

Document Actions
Powered by Plone