On 5/27/25 23:23, Mark wrote:
Hi,

The place holders listed as available on the "Add new template" page are:

$hyperkitty_url
$listname
$list_id:
$display_name
$short_listname:
$domain
$info
$request_email
$owner_email
$site_email
$language

What Postorius version is this? You may be missing some things added in 1.3.11.

A more complete list including the ones that only work in certain contexts is at https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/templates.html#templated-texts a pointer to which was added in 1.3.11.

The only one that seems to sort of work on my template is $list_id - which displays as "testlist". (I was expecting to see "testl...@example.com").


$listname should be replaced with the fqdn list name like "testl...@example.com" and $short_listname should be replaced with the list name without the @domain as in "testlist". The others should all work as documented. I don't know why they wouldn't. Can you give an example of a template that doesn't get these substituted.


The others just get displayed as a variable. Eg. $owner_email

Have I missed a setting somewhere?

The actual substitution is done by the Python `string` library module Template class, safe_substitute method. See the doc at https://docs.python.org/3/library/string.html#template-strings

Note that because we use the safe_substitute method, invalid substitutions don't produce errors, they just aren't substituted. In particular if `$identifier` is followed immediately by a letter, digit or underscore, `identifier` must be wrapped in `{}` to separate it from the following characters, e.g., `${identifier}x`.

--
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@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/76INK6SPCGTH2ZXE2B2IZBQY67IW22K3/

This message sent to arch...@mail-archive.com

Reply via email to