I would like to be able to distinguish between comments and updates in the digest item body. So I would like to have the same variables available for a digest item as for other subscription items.
I would like to be able to distinguish between comments and updates in the digest item body. So I would like to have the same variables available for a digest item as for other subscription items.
Comments
Comment #1
salvisUnfortunately, because of the complex interaction with the mail_edit module (which is beyond my reach) this is very difficult...
Comment #2
gustav commentedI am sure you are right. But out of curiosity: what determines which variables for the items can be passed to the template and which ones can not?
Comment #3
salvisThe majority of the variables are advertised and populated through the mail_edit module, which does not kick in until the message is actually sent. The bodies that go into !bodies need to be pre-assembled before the message is sent, and thus they don't have those variables available to them.
This is a complex and confusing part of Subscriptions...
Comment #4
gustav commentedsalvis, thanks a lot for trying to explain that to me. Very much appreciated. Where can I find the code that assembles the body items?
Comment #5
salvisIt's all in subscriptions_mail_cron() — look for
if ($digest)
and
if ($mails)
For the mechanism that sets the mail variables, search for mailvars...
Comment #6
salvisYou need to delete the digest template rows from {mail_edit} and {subscriptions_mail_edit} in order to see the new digest template. You should now be able to use all variables except for !sender_* and !recipient_*.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.