Mail displays code call if there is no matching field in the content
kierduros - January 12, 2009 - 14:49
| Project: | Mail Editor |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Created a template that will mail a digest newsletter of recent content to subscribers (using the subscription module).
Not all of my content types have all the same custom fields. Notably, most content has a subhead (called by the template with !cckvalue1_field_sub_headline) but events do not.
When an event posts to the newsletter, instead of skipping the call for the non-existent field or producing a blank line, the template simply echoes back the call for the content (!cckvalue1_field_sub_headline).
Needless to say, this is not what I want to be sending out to people.

#1
You need to use conditionals, see the README.txt file in Subscriptions.
#2
Well how about that... a useful ReadMe file!
(Now don't I feel silly for not looking there first...)
Thanks, salvis, you do good work.