Popular Community Topics into Email Templates
Hi everyone,
We are looking to pull in the most popular topics from our community and have these displayed within the daily digest email that we send out.
We have attempted to do this by putting the following calls into the email template:
<#assign messages=rest("/topics/style/blog/recent?page_size=3").messages />
<#list messages.message as message>
<#assign msg=rest("/messages/id/${message.id}").message >
<#assign articlesubject = rest("/messages/id/${message.id}/subject").value>
<#assign body = msg.teaser?replace("<(.|\n)*?>", "", "r")> <a href="${message.@view_href}">${message.subject}</a></p>
<div class="left-column-content" align="left"> <#if body?string?length gt 250> ${body?substring(0, 247)}... <#else>${body}</#if> <a href="${message.@view_href}"><b>read more</b></a> </div>
</#list>
When I try to save this within studio, I get an error. Is there an alternative method we can use to pull in the most popular Community topics into this email template?
Thanks,