SilvaStylesheets (2.1)
- SilvaStylesheets download link: http://www.zope.org/Members/aaltepet/SilvaStylesheets/SilvaStylesheets-2.1/SilvaStylesheets-2.1.tgz
- Homepage of SilvaStylesheets: http://zope.org/Members/aaltepet/SilvaStylesheets
- Description source: http://www.zope.org/Members/aaltepet/SilvaStylesheets/readme.txt
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 edit.pt
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
)