Hi all
is it possible to have a clear reference/example of ACS capabilities in terms of javascript customization of email templates?
For instance: we have some custom "product listing" requirements that are not easily implemented using out of the box functionality.
We need to be able to apply some behavour on every list item, depending of some attributes and so we may need to script the iteration.
For example (pseudo code):
<% for (int i=0; i<productList.length; i++) {
var product = productList[i];
%>
<tr>
<%
if (product.someproperty=='XX') {
%>
.....custom layout...
<%}%>
</tr>
<%}%>
Do you think that this is possible in ACS?
Thanks.
Fabio
Solved! Go to Solution.
Hi Fabio,
there is no official documentation on JavaScript customization.
Only the "standard" way is documented. There are some JS customizations feasible but not documented and they might be removed in the future.
But technically you can solve the use case you described below:
Views
Replies
Total Likes
Hi Fabio,
there is no official documentation on JavaScript customization.
Only the "standard" way is documented. There are some JS customizations feasible but not documented and they might be removed in the future.
But technically you can solve the use case you described below:
Views
Replies
Total Likes
Hi, thanks for the reply.
Anyway we tried with Javascript but with no luck.
If we use someting very basic like:
<%
var products = context.rtEvent.ctx.products;
%>
<table>
<tbody>
<%
for each(var product in products) {
%>
<tr><td><%=product["productName"]%></td></tr>
<%
}
%>
we got that
(1) when we save the delivery, ACS rearranges the markup, moving the for-loop outside the table, someting like
<%for... {>
<%}>
<table>...</table>
(2) as productName prints "undefined" (while we are sure that "productName" is passed via API call)
What are we missing?
Thnx
Fabio
Views
Replies
Total Likes