OK, I've looked and looked and looked and because I have to search using things like "mail-edit" and "!node_type", I just can't find what I'm looking for.

All I'm trying to do is print a cck field if the node is of a particular type. This is what I've come up with:

{{!node_type==groupevent?:!cckvalue1_field_startdate
}}

{{!node_type==story?:!cckvalue1_field_date }}

Is this correct?

Comments

salvis’s picture

{{!node_type==groupevent?:!cckvalue1_field_startdate
}}

"If !node_type is 'groupevent' then do nothing, otherwise display !cckvalue1_field_startdate and start a new line."

{{!node_type==story?:!cckvalue1_field_date }}

"If !node_type is 'story' then do nothing, otherwise display !cckvalue1_field_date, followed by a space character."

From what you describe, you probably want to put the field values between ?:, not after the colon.

P.S. Note that conditionals are a Subscriptions feature, not a Mail Editor feature.

somebodysysop’s picture

Project: Mail Editor » Subscriptions

Thank you so much! Switching this issue to Subscriptions.

{{!node_type==story?!cckvalue1_field_date: }}

"If !node_type is 'story' then display !cckvalue1_field_date, otherwise do nothing."

Is this correct?

salvis’s picture

Status: Active » Fixed

Yes, except you're outputting a space in the else case.

Status: Fixed » Closed (fixed)

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