Creating and placing custom templates
I know there are previous threads related to this topic but none were very recent so I thought I'd start a new one. I've referenced two of the old ones below.
I am attempting to implement a custom footer on one of my lists. This seems like it should be straightforward but I'm clearly doing something wrong, since the default footer keeps coming through despite my efforts. I've referenced the docs as well as these two posts, to no avail. https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/O... https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
Here's what I'm doing:
I found my templates folder and verified it matched what is set in the mailman.cfg file - on my Ubuntu Bionic system it is /var/lib/mailman3/templates/
In that folder I created the following folders and made sure they were properly owned (by list:list) /var/lib/mailman3/templates/lists/f2p2-test.udfcd-lists.org/en/
Into that en/ folder I placed a file called "list:member:regular:footer" It is a text file with just one line of text in it (a link to a website). Also, because there was a mention in one of the earlier posts that this file should have a .txt extension, I also put the same file in there named "list:member:regular:footer.txt".
I have two of my own emails subscribed t my "f2p2-test" list at the domain udfcd-lists.org. When I post to the list, and check my other email for the disseminated post, it still has the default footer.
I have restarted the mailman3 service.
Can anyone spot an obvious error here or offer troubleshooting suggestions? Thank You!
~Kelly
On 5/2/19 12:45 PM, kelly.close@lrewater.com wrote:
Here's what I'm doing:
I found my templates folder and verified it matched what is set in the mailman.cfg file - on my Ubuntu Bionic system it is /var/lib/mailman3/templates/
What is the setting, if any, for 'layout' in your mailman.cfg?
If, for example, you have
layout: fhs
The default var_dir in that layout is /var/lib/mailman, not /var/lib/mailman3, although that could be changed in a [paths.fhs] section.
In that folder I created the following folders and made sure they were properly owned (by list:list) /var/lib/mailman3/templates/lists/f2p2-test.udfcd-lists.org/en/
Into that en/ folder I placed a file called "list:member:regular:footer" It is a text file with just one line of text in it (a link to a website). Also, because there was a mention in one of the earlier posts that this file should have a .txt extension, I also put the same file in there named "list:member:regular:footer.txt".
Yes, you do need the .txt extension.
If this doesn't work, it's possible you have a different URI for the template. Try
bin/mailman shell Welcome to the GNU Mailman shell'list:member:regular:footer',
tm = getUtility(ITemplateManager) tm.raw('list:member:regular:footer', 'f2p2-test.udfcd-lists.org')
This should return something like
'mailman:///$listname/$language/list:member:regular:footer.txt'
Does it?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
kelly.close@lrewater.com
-
Mark Sapiro