In general GoodNews uses single MODX site teplates for rendering Newsletter content. But you can use each combination of Templates, Chunks, Snippets and TVs like in "normal" MODX Resources.

Structure of a GoodNews Newsletter Template

A GoodNews Newsletter template is a complete HTML structure with DOCTYPE, HTML, HEAD and BODY. The style sheet rules need to be in the HEAD of the document.

GoodNews comes with a preinstalled ready to use professional and responsive Newsletter template which works in all relevant email clients and also on mobile devices. The preinstalled Template is called sample.GoodNewsNewsletterTemplate1.

If you would like to change preinstalled Newsletter Templates you should do so by making a copy of the desired element - as all preinstalled elements will be overwritten if you install an updated version of GoodNews.

Predefined Placeholders for Newsletter Templates

The following MODX placeholder tags are automatically assigned by GoodNews and can be used in Newsletter templates.

Special placeholders which contains IDs of the corresponding Resource documents

[[+unsubscribeResource]]
[[+profileResource]]

GoodNews meta field placeholders

[[+subscriber_id]]
[[+sid]]
[[+subscribedon]]
[[+testdummy]]
[[+ip]]
[[+soft_bounces]]
[[+hard_bounces]]

MODX User profile placeholders

[[+fullname]]
[[+email]]
[[+phone]]
[[+mobilephone]]
[[+blocked]]
[[+blockeduntil]]
[[+blockedafter]]
[[+logincount]]
[[+lastlogin]]
[[+thislogin]]
[[+failedlogincount]]
[[+dob]]
[[+gender]]
[[+address]]
[[+country]]
[[+city]]
[[+state]]
[[+zip]]
[[+fax]]
[[+photo]]
[[+comment]]
[[+website]]

Extended fields

[[+extended.Field1]]
[[+extended.Field2]]
...

+sid (secure key) is a value from the GoodNews subscriber meta table (which extends the user profile) and is unique for each subscriber and typically used by submitting via URL parameter. It is needed to identify the Subscriber/User on your website when a link is clicked in a newsletter (e.g. Unsubscribe or Edit Profile links).

Susbcribers won't necessarily need to know it's MODX user credentials! Updating the Subscribers profile or canceling subscription will be handled through secure links from within a newsletter with the additional and unique secure ID (+sid) attached via URL parameter.

This is how Unsubscribe and Edit Mailing Profile links are integrated in your Newsletter template:

<a href="[[~[[+unsubscribeResource]]]]?sid=[[+sid]]">Unsubscribe</a> | <a href="[[~[[+profileResource]]]]?sid=[[+sid]]">Edit Mailing Profile</a>

The +unsubscribeResource and +profileResource placeholders gets it's values (IDs of the related MODX Resource documents) from the GoodNews Container settings.

Screenshot of the Mailing settings of a GoodNews container