Is it possible to template JavaScript
or CSS
files with TAL
?
(or maybe there is some other templating mechanism in Zope
exists)
e.g. templated CSS
file will be something like that:
#button {
background-color: <%= buttonColor %>;
background-image: <%= buttonImage %>;
}
If you are using Zope2, use DTML. TAL/ZPT is only appropriate for HTML/XML/SGMLish markups.
If you are using browser views, you can also choose to use any Python-based template system, should you be willing to take care of rendering the template in your view's
index()
(or__call__()
) method.