I would like to add some custom html to the newsletters after they are published.
I know I can edit the newsletter template in newsletters/* but these are cached statically in the db once a newsletter is computed.
You mean « Edit a copy of the newsletter template in the site’s specific template folder » ?
But see with var_mode=inclure
: the template that displays publicly the HTML is not in newsletters/*
, it’s /newsletter.html
at the root of the templates folder.
I guess newsletters/*
templates creates the static cache while /newsletter.html
displays it publicly.
I don’t understand how I could add some code such as [(#SESSION{id_auteur}|oui) custom code] to the pages that display published newsletters.
While editing /newsletter.html
in your site’s local template folder, you can achieve anything you want : including using #SESSION and apply a filter to #HTML_EMAIL depending on the sessions value or lack of value.
Just beware doing so will not enable SPIP to cache the public newsletters pages of logged users.
In case you got lot of logged users, you might want to use macrosession plugin.
JLuc