Putting in shortcodes in .SS template from an external source

SS 3.2

Hi, one of my site uses an external api to load booking courses on the page template, but their syntax is similar to Silverstripes so the only way I can load in parts of the page im using an Ajax request.

I was wondering is there some sort of shortcode where I can put their syntax in the .ss template file which would not conflict with Silverstripes own syntax?

For example this a section on the page pulling in courses from their API:

<div class=“arlo-date”>
<%= formatDate(StartDateTime, “ddd D MMM YYYY”) %>
</div>
<div class=“arlo-time”>
<%= formatSessionsInformation({ fieldsToDisplay: [‘TimeSpan’] }) %>
</div>

<div class=“arlo-title”>
<%- Name %>
</div>

When I put this code into the .SS it throws errors as it thinks its Silverstripe syntax, is the only way I can put this code into my template through Ajax?

Thanks in advance

Anish

You can possibly create a page text field to store that and render in your template via $Field.RAW
That should bypass the <% parsing

Good shout, i’ll give that a go.

Works perfect, thanks man!