Developer forum

Forum » Templates » how to remove or replace e-mailtags for online viewing?

how to remove or replace e-mailtags for online viewing?

Ton Martens
Reply

Hello,

For newsletters, we like to use one template to be used for the e-mail and for viewing online.

  • So the recipient receives the newsletter;
  • On top there is "view this newsletter online" with a link to the page (which is the same page as the newsletter itself);
  • At the beginning there is a personalisation tag  {{Email:User.Name}},
  • At the button there is an 'unsubscribe link'; {{EmailMarketing:Email.UnsubscribeLink}}

When viewing this page online (browser) the {{Email:....}}-tags are shown as is! Obviously, this is not what we want. We would like to be able to replace these or remove these, based on the way the template is rendered (email or web).

Any suggestions are appreciated. 

Thanks,

Ton


Replies

 
Nicolai Høeg Pedersen
Reply

You can maybe wrap them in a span tag with a class that is handled differently in the website than in the email. I.e. you can have <span class="emailTags"> around them and run a simple JS in JQuery:

$(".emailTags").remove();

The JS is not run in Emails

 
Ton Martens
Reply

Good thinking! Thanks

 

You must be logged in to post in the forum