Expand my Community achievements bar.

SOLVED

How to add mirror link page to custom html 5 template?

Avatar

Level 2
 
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@GiulioZu ,

You can use OOTB Content block 'Link to mirror page'

Or try below script

<html>
<head/>
<body>

<% if ( document.mode != 'mirror' && document.mode != 'forward' ) { %><p align=center>
  <font style="font-family: Verdana, Arial; font-size: 10px">
  <a href="<%@ include fragment='MirrorPageUrl' %>" _label="Mirror page" _type="mirrorPage">Click here for Browser version</a>
  </font>
</p><% } %>

<p>Other Email Body Content</p>

</body>
</html>

 

View solution in original post

12 Replies

Avatar

Community Advisor

Hi @GiulioZu ,

You can add out of box mirror page personalization block by adding <%@ include view='MirrorPage' %> in HTML.

 

In email body, it will render us:

If you are unable to view this message correctly, click here

 

Instead of above default text content for mirror page, if you want to display other text like 'Click here for Browser version', then you can add below syntax in your HTML template

<a href="<%@ include view='MirrorPageUrl' %>" _label="Mirror Page" _type="mirrorPage">Click here for Browser version</a>

Now in the email body, the above will render us:

Click here for Browser version

Avatar

Level 2

And automatically Adobe Campaign will hide this cta in web version?

Avatar

Level 2

Attach the final HTML I'm uploading in my campain using the legacy edfitor, 

but the email seems to have some error, the preview does not show up and if I do send proof+rendering html it does not arrive.

Screenshot 2023-07-02 at 09.46.31.png

when I remove the mirror line everything works again. Do you any suggestion? 

 

Avatar

Community Advisor

Hi @GiulioZu ,

Your query is for adding mirror page in email using Adobe Campaign standard?

Avatar

Community Advisor

Hi @GiulioZu ,

If you are using adobe campaign standard, use the below syntax

 

Adobe Campaign Standard:

href="<%@ include fragment='MirrorPageUrl' %>"

Example, (try the below HTML script in your delivery and check it)

 

 

<html>
<head/>
<body>
<p>
<a href="<%@ include fragment='MirrorPageUrl' %>" _label="Mirror page" _type="mirrorPage">Click here for Browser version</a>
</p>
</body>
</html>

 

 

ParthaSarathy_0-1688365049947.png

ParthaSarathy_1-1688365412183.png

 

Adobe Campaign Classic:

href="<%@ include view='MirrorPageUrl' %>"

 

 

<html>
<head/>
<body>
<p>
<a href="<%@ include view='MirrorPageUrl' %>" _label="Mirror page" _type="mirrorPage">Click here for Browser version</a>
</p>
</body>
</html>

 

 

 

Avatar

Level 2

ok @ParthaSarathy , it's working using:

<a href="<%@ include fragment='MirrorPageUrl' %>" _label="Mirror page" _type="mirrorPage">Click here for Browser version</a>

but when i click and go to web version, this link is still visible. It should be not visible, how can i hide in web version?

Avatar

Correct answer by
Community Advisor

@GiulioZu ,

You can use OOTB Content block 'Link to mirror page'

Or try below script

<html>
<head/>
<body>

<% if ( document.mode != 'mirror' && document.mode != 'forward' ) { %><p align=center>
  <font style="font-family: Verdana, Arial; font-size: 10px">
  <a href="<%@ include fragment='MirrorPageUrl' %>" _label="Mirror page" _type="mirrorPage">Click here for Browser version</a>
  </font>
</p><% } %>

<p>Other Email Body Content</p>

</body>
</html>

 

Avatar

Level 2

By entering your condition seems the HTML editor doesn't read it correctly:

Screenshot 2023-07-03 at 09.12.21.png

Screenshot 2023-07-03 at 09.13.34.png

 and the mail is not sent.

Avatar

Community Advisor

pls copy paste the exact HTML content provided above

ParthaSarathy_0-1688368716836.png

It should be

<% if ( document.mode != 'mirror' && document.mode != 'forward' ) { %>

Avatar

Level 2

I inserted "&&" but code editor converted in "&amp;&amp;" (using "show source")

Screenshot 2023-07-03 at 09.47.20.png

  

Avatar

Community Advisor

Then you can use only

<% if ( document.mode != 'mirror') { %>

<html>
<head/>
<body>

<% if ( document.mode != 'mirror') { %><p align=center>
  <font style="font-family: Verdana, Arial; font-size: 10px">
  <a href="<%@ include fragment='MirrorPageUrl' %>" _label="Mirror page" _type="mirrorPage">Click here for Browser version</a>
  </font>
</p><% } %>

<p>Other Email Body Content</p>

</body>
</html>