##AGNUID## being replaced only once in an HTML template

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

sannc
Posts: 13
Joined: Tue Jul 01, 2008 1:23 pm
Location: Aschaffenburg

##AGNUID## being replaced only once in an HTML template

Post by sannc »

Hi there,

I'm just working on a template. I defined one template using agnDYN tags which works really fine. I found that the text-only content is being generated from the HTML content automatically by just omitting the HTML tags. This works fine for me *except* ...

If I wanted to place the unsubscribe link in the HTML content I would do this by something like

Code: Select all

<a href="url incl. ##AGNUID##">some text</a>
When I do this, the plain text content ist just "some text" without the link. No problem, yet. So I should replace the "some text" with the complete URL and it would end up in something like

Code: Select all

<a href="url incl. ##AGNUID##">url incl. ##AGNUID##</a>
But this is where the problem begins: The ##AGNUID## token is being replaced only once so that the URL inside the a-tag is correct, but the text being displayed still contains the ##AGNUID## token, resulting in the fact that the plain text readers of the newsletter (those who prefer to even view HTML emails in plain text) still won't be able to get the correct unsubscribe link.

Bug or feature? And what is the solution?

Best regards
Carsten
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

solution

Post by maschoff »

We put the unsubcribe link in the footer of the template like this:

Text version

Code: Select all

If you want to unsubscribe from the OpenEMM newsletter, please use this link:
http://www.openemm.org:8080/form.do?agnCI=1&agnFN=unsubscribe&agnUID=##AGNUID##
HTML version

Code: Select all

If you want to unsubscribe from the OpenEMM newsletter, please click <a href="http://www.openemm.org:8080/form.do?agnCI=1&agnFN=unsubscribe&agnUID=##AGNUID##">here</a>.
OpenEMM Maintainer
sannc
Posts: 13
Joined: Tue Jul 01, 2008 1:23 pm
Location: Aschaffenburg

Re: solution

Post by sannc »

ma wrote:We put the unsubcribe link in the footer of the template like this:
Ah ... ok. That's a workaround ... but maybe you want to think about getting the ##AGNUID## replaced even if it occurs more than once :-)

Kind regards
Carsten
Post Reply