[Mailman-Users] Template Token Hell
Mark Sapiro
msapiro at value.net
Mon Oct 16 23:07:58 CEST 2006
Lindsay Haisley wrote:
>I'm up
>against a veritable jungle of different substitution tokens in different
>templates. %(listname)s is the equivalent of the Python Mailman var real_name
>(the "pretty" name) in some places, while in others %(list_name)s is the
>lower-case name used for directories. Yet other templates use replacement
>sequences that are more like HTML tags, e.g. "<MM-List-Name>".
>
>A. Is there any reference (other than reading code) where all these are
> defined for the different contexts in which they occur?
No.
>B. Is there any plan to organize this mess into something more logical?
We recognize the problem and have some ideas that reach this area (see
<http://wiki.list.org/display/DEV/Mailman+2.2>), but no guarantees.
>In particular, I'm trying to find out if there's a lower case version of the
>list name available in archtocnombox.html and archtoc.html (where %(listname)s
>is the "pretty" name selected by the list administrator), and what other
>substitution tokens are available in the context of these two templates.
In general, the %(key_word)s substitutions are specific to any given
template that uses them and the only ones defined for a specific
template are the ones that appear in the default template.
It's pretty easy to patch the code to pass additional key_word:value
items to substitute in the template, but it does require patching the
code. See
<http://mail.python.org/pipermail/mailman-users/2006-September/053399.html>
for more info.
>Maybe I oughta post this on the dev list. Can anyone here answer it?
I think it's in the grey area where it could go on either list.
--
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list