[Mailman-Developers] Template file lookup

Jeb Bateman jeb@ocha.net
Sat, 19 May 2001 22:36:27 -0700

On Fri, May 18, 2001 at 02:28:40PM -0400, Barry A. Warsaw wrote:
> ...and also provides a much requested feature, namely that you will
> only need to specialize templates that you actually want to change,
> and that you have multiple levels of specialization.
> Here's how it works.
> There are 4 levels of template specialization: list-centric,
> vhost-centric, site-centric, and default, corresponding to the
> directories
>     $prefix/lists/$listname
>     $prefix/templates/$host_name
>     $prefix/templates/site
>     $prefix/templates

This is great, I think, since I've hacked the copy of Mailman I'm
using similarly to the patch on sourceforge to enable list-specific
templates, (but it was a fragile fix at best without mlist being
passed to the template merge function).

Anyway, I'm glad to see this is being done right, although I seem to
remember seeing a comment by someone recently about the 2.1 alpha
Mailman assuming that every directory under $prefix/lists/$listname
being a language directory for templates, which caused problems with
something, and I remember thinking there might be other reasons I'd
want more directories for other purposes under a list directory.

So, I'd suggest moving all list templates into a 'templates'
subdirectory of the list.  Ie, the first search is:


This would keep the list directory uncluttered, and also eliminate
code ambiguity about putting other directories under the list dir.

Also, one other feature I've been thinking about is to make the web
interface for editing templates include a pop-up menu of all templates
that affect a list, (searching up the hierarchy for each).  Then, when
the admin chooses to edit one, it is saved in the $listname/templates
directory.  Therefore, there is no need to install the current 4 list
specific templates in the list templates directory to begin with, and
list admins are free to modify any templates affecting their list.

Hoping that made sense,

Jeb Bateman <mailto:jeb@ocha.net>
BuyOrganic.org project - http://buyorganic.org