On Tue, Feb 17, 2009 at 12:08, Tino Wildenhain <t...@wildenhain.de> wrote:
> You should really not generate CSS ;) And JS is best generated with
> Jason :-)
You need to generate CSS when you want to use absolute paths for
images referred to in your CSS. This can easily be done with ZPT:
background: white url('$portal_url/spinner.gif') right center no-repeat;
The above code snippet is taken from a current project; the portal_url
dance is there because this is a browser:resource template and such a
template only has access to the request, not a context.
We also generate some JS to provide client-side code with translated
labels. Alternatively you can do this with hidden elements in your
main template as well, but the generated JS way was more maintainable
as this keeps the labels and the code close together.
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -