gadgetto / GoodNews

An integrated group and newsletter mailing system for MODX Revolution CMF
GNU General Public License v2.0
10 stars 4 forks source link

Show Unsubscribe and Edit Mailing Profile links only in Email, not in Template/preview of the newsletter #73

Closed 70hundert closed 4 years ago

70hundert commented 4 years ago

Hi there!

On creating a new newsletter you choose a "Mail Template" that shall be used for displaying the newsletter and for the email that is getting sent. I am using the "sample.GoodNewsNewsletterTemplate1" which contains the following code for unsubscribing and editing the mail profile:

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

So you definately need this in the email that is getting sent, so the user an subscribe and edit his/her profile.

But when viewing the newsletter in the browser, I don't want these links to be shown. They should only appear in the mail.

How do I accomplish that?

gadgetto commented 4 years ago

You need to modify the desired template and add a snippet call which detects if the mailing is viewed on your website. Depending on this you could hide/remove the unwished parts.

Closing this as this is not an issue.