Another thread starts to drift off — let's continue this here:

Here's what the README.txt says:

Mail Templates
--------------

Go to admin/build/mail_edit to edit the mail templates.

Some of the variables are only available if you save the templates, 
and not at all in digest mode.

However, as long as you DON'T save the templates, they are automatically
translated to the recipient's language. Like other user-modifiable strings, 
when you edit and save them, they stop getting localized. For multi-language
customization, you need to edit the subscriptions_mail.templates.inc file.

You can use conditional text in the templates. The syntax is

   {{!varname==value?then_text:else_text}} or
   {{!varname!=value?then_text:else_text}}

!varname can be the any variable and will be replaced;
value is a string that doesn't contain a '?';
then_text is a string that doesn't contain a ':' and
else_text doesn't have that limitation.

Both then_text and else_text can contain newlines and variables.

What is it that you don't understand and how could I make it clearer?

Comments

RobertNelsonVance’s picture

So, for example.... {{!varname==value?then_text:else_text}} could be implemented as the following?

{{!has_new_comments==1?This has new comments.:This doesn't have any new comments.}}

salvis’s picture

Yes, exactly.

salvis’s picture

Version: 5.x-2.0 » 5.x-2.x-dev
Status: Active » Fixed

I added your example to the README.txt file.

RobertNelsonVance’s picture

Version: 5.x-2.x-dev » 5.x-2.0
Status: Fixed » Active
StatusFileSize
new1.39 KB
new4.98 KB

ok..... i like this module better than the others i have tested out..... but, i have spent a ridiculous amount of time trying to get this template configured the way i want to and it just seems to not be working.

HERE'S WHAT I WANT:

i would like to receive the email notifications as follows for new content; if the new content is a comment. displaying the original blog post is not necessary or necessarily desirable if possible. emailing out none updates isn't necessary, but i was attempting to do so:

* blog entry
--- node title
--- is updated text
--- node author
--- node teaser or body
--- node url

* blog entry comment
--- comment title
--- comment body or teaser
--- comment author
--- comment url

* next blog entry with it's comments

* etc

HERE'S WHAT I AM GETTING:

* i created a couple completely NEW test blog posts and then created a couple completely NEW test comments for each.
* i then run cron and the email appears in my inbox.
* in the email, the first blog post appears (title, missing "is updated" text, teaser, missing author, url), and underneath is each comment for this blog post (title, teaser, author, url). then the next blog post appears (title, missing "is updated" text, missing teaser, missing author, url), and underneath is each comment for this blog post (title, teaser, author, url).

i am attaching the email that i am receiving when cron is run (minus sensitive mail header details of course). i am also attaching the mail template settings i have setup.

am i setting up the template incorrectly? is there a bug? help is greatly appreciated!!!

salvis’s picture

Status: Active » Postponed (maintainer needs more info)

Why do you say 'missing "is updated" text'? If your posts are new, then they're not updated.

A post is either "new" or "updated" (but NOT both!), and/or it can have comments.

Aside of that I cannot see anything that wouldn't be working right.

Please let's take one issue at a time, following this pattern:

Line number:
Observed:
Expected:

RobertNelsonVance’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Ok.... I think I have gotten this figured out how I want it. Thanks.

salvis’s picture

Status: Closed (fixed) » Fixed

Great, thanks.

Let's enjoy the fruit of our labor... :-)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.