On 03/13/2014 02:40 AM, Rodti MacLeary wrote: > > While I appreciate that the Mailman tags available to the footer can be > useful for adding list admin info etc into the footer, it would be nice > to be able to inject scripted or dynamic content in there. Even if the > footer could be persuaded to read a text file (like the other template > files) then that text file could be updated.
For Mailman 2.1, the Mailman/Handlers/Decorate.py module (called by SMTPDirect.py during outgoing message processing) augments the replacement dictionary for headers and footers from a 'decoration-data' dictionary in the messages metadata if it exists. Thus, you can create a custom handler (see <http://wiki.list.org/x/l4A9>) and insert it in the pipeline before ToOutgoing to make the appropriate dictionary and add it to the metadata. E.g., it could do something like ... build dynamic_content ... msgdata.decoration-data = {'mystuff': dynamic_content} Then, a %(mystuff)s replacement in the footer would be replaced by the dynamic content built by the custom handler. -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org