[Mailman-Developers] Templating the interface
andy at insectnation.org
Tue May 1 23:18:01 CEST 2007
Aaron Crosman wrote:
> From my reading of the responses to my question I see two ways that
> people are thinking of proceeding, which I think might complement
> each other well.
I'm reading this thread with interest, as the problems of working with
the current templates are really why I'm on this list even though I've
never got round to raising the issue!
Can I request that if the templates are being re-written some attention
should be paid to the idea of making Mailman embeddable within a parent
site's HTML framework and styles. For example, I run a system called
HepForge where several content sources are hidden behind Apache and the
page headers and footers, including CSS imports, are added by Apache
output filters. A significant amount of work is currently required to
edit Trac and Mailman templates to make them work with this sort of
system - see http://trac.edgewall.org/ticket/4264 for a bit more detail
on the issues with Trac's templates. This is a problem which is largely
agnostic to the templating technology used and has more to do with design.
In particular, it would be really nice if
* the bits of the template which define <head>, <body> etc. are defined
in one pair of header and footer files, so they can be turned off easily;
* the CSS files "namespace" everything by placing all Mailman content
within a div, e.g. <div id="mailman">...</div> and then prefix all CSS
rules with "#mailman" - this stops the Mailman styles from leaking out
into the parent page elements.
I can add this to the wiki if it's useful. Is it?
(Sorry to dwell on implementation specifics at this stage, but it's an
issue that's often ignored but is actually pretty important to people
who want to incorporate external packages into their own framework.)
> First, there's the approach of fixing the current pages by moving the
> style information out of the Python code and into a CSS file.
> Second, there's the more extensive work to switch to a proper
> templating system like Genshi.
Genshi has been mentioned a few times. My impression was that it insists
on producing valid XML output, which is nice, but doesn't necessarily
play well with ideas like factorisable head/foot portions. Also, can it
be used for templating the automated email messages, i.e. plain text
rather than XML? I'm not speaking from exceptional familiarity with
Genshi here, but these suspicions made me use Cheetah in place of Genshi
for one of our projects... can anyone confirm/refute these prejudices
(off-list if necessary)?
More information about the Mailman-Developers