


I want costom my tracking label in ACM delivery, and I see below article, but I'm not sure how can I add an extra script array of the delivery
I try to add the array ang got below pic error. how can I add the array articleList?
The solution is to:
Pre-load all the possible articles in an extra script array of the delivery - articleList[] - which means there must be a finite number of possible articles.
Write a JavaScript function at the beginning of the content.
<%@ value object='startScript' %> function displayArticle(articleId) { <%@ foreach object="articleList" item="article" %> if( articleId == <% value object="article" xpath="@id" %> ) { <%@ value object='endScript' %> <a href="http://nl.net?a.jsp?article=<%@ value object="article" xpath="@id" %>">article</a> <%@ value object='startScript' %> } <%@ end @%> } <%@ value object='endScript' %>
Display the article by calling the function.
<% for(var i=0; i<recipient.rcpArticle.length; i++ ) { displayArticle(recipient.rcpArticle[i].article.@id) } %>
Views
Replies
Sign in to like this content
Total Likes
Not sure to understand fully the need.
On my side, I prefer to use an array in JSON and to loop directly in the delivery in order to build the HTML:
javascript is prohibited in emails, at least, for deliverability purpose
Not sure to understand fully the need.
On my side, I prefer to use an array in JSON and to loop directly in the delivery in order to build the HTML:
javascript is prohibited in emails, at least, for deliverability purpose