[Mailman-Users] Theming member options page

Mark Sapiro mark at msapiro.net
Tue Mar 18 17:34:04 CET 2008

Tom Chance wrote:
>Unfortunately some pages don't have templates, they seem hard coded into
>the Python code! For example, when you enter your email address to
>change subscription options without already being logged in, you get a
>page whose contents is included in these files:
>/var/lib/mailman/Mailman/htmlformat.py - header & footer
>/var/lib/mailman/Mailman/Cgi/options.py - contents
>Is there a cunning trick I'm missing / are there plans to abstract this
>out to a template file? Otherwise I'll try putting the "login-unsub" and
>password/login buttons directly onto the main listinfo page along with
>the email field to see if I can bypass this interim page altogether.

I think it would be really difficult to eliminate the options login
paqe completely without hacking the code. You could work around it
when coming from the listinfo page, but what if someone goes to the
options page directly without being logged in?

We are definitely aware of the shortcomings of the current GUI and are
trying to do better for Mailman 2.2.

In the mean time, one thing you can do which involves only a minor code
change is in the Format() method of the Document class in
htmlformat.py, you can insert a stylesheet reference immediately before

            output.append('%s<BODY %s' % (tab, SPACE.join(quals)))

something like

            output.append('<link rel="stylesheet" type="text/css" '
            output.append('%s<BODY %s' % (tab, SPACE.join(quals)))

This will add the stylesheet reference to all pages except those built
from templates that have their own <head> section.

Mark Sapiro <mark at msapiro.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