[Mailman-Users] Customizing main listinfo page?
Nigel Kersten
nigel at cofa.unsw.edu.au
Wed Jan 9 01:15:19 CET 2002
Just in case anyone wants to do what I asked about doing, which is to
customise the listinfo page to include stuff in the <HEAD></HEAD> section,
mainly stylesheets and javascript, the easiest way I found appeared to be to
change the creation of 'doc' in /usr/local/mailman/Mailman/Cgi/listinfo.py,
from
doc= Document()
To
doc = HeadlessDocument()
And then manually inserting all the HEAD stuff before the table data gets
written to 'doc'.
Nigel
On 7/1/02 2:04 PM, "Nigel Kersten" <nigel at cofa.unsw.edu.au> wrote:
> Ok, so it's apparently ok for me to customise this page, and I'll get warned
> when I upgrade.
>
> Now for another question... ;) that possibly belongs more on the Dev list,
> but here goes...
>
>
> I'd like to merge my listinfo page into the rest of my site, so I'd like to
> use style sheets... My only problem is that I can't see how on earth I can
> insert anything before the </HEAD> tag in the Document() call in the
> listinfo page... ?
>
> The relevant bit seems to be in htmlformat.py, here...
>
> class Document(Container):
> title = None
>
> def SetTitle(self, title):
> self.title = title
>
> def Format(self, indent=0, **kws):
> tab = ' ' * indent
> output = ['Content-type: text/html',
> '',
> tab,
> '<HTML>',
> '<HEAD>'
> ]
> if self.title:
> output.append('%s<TITLE>%s</TITLE>' % (tab, self.title))
> output.append('%s</HEAD>' % tab)
> output.append('%s<BODY' % tab)
>
>
>
> I guess I could just hack it and add something to insert data before this,
> but this definitely seems like bad form to go messing with this module... ?
>
>
>
> Nigel
--
N i g e l K e r s t e n | College of Fine Arts,
[Systems Administrator] | Uni.of.NSW.Sydney.Australia.
nigel at cofa.unsw.edu.au | ph.9385 0672:fax.9385 0624
"It's like a jungle sometimes, it makes me wonder,
how I keep from going under" - Grandmaster Flash.
More information about the Mailman-Users
mailing list