Expand my Community achievements bar.

Dive in, experiment, and see how our AI Assistant Content Accelerator can transform your workflows with personalized, efficient content solutions through our newly designed playground experience.
SOLVED

How to comment a helper function or javascript code in email templates in AJO

Avatar

Community Advisor

Hi,

 

I am trying to create an email template for sending out campaigns in AJO. I wrote some html code and tried to comment it using <!-- hello --> and it is working fine.

However when in the same html code i added a helper function <!-- {%= age(date) %} --> the comments are not working properly.

 

Does anyone have an idea on how we can add a comment around helper functions .Attaching screenshot for reference 

 

arpangarg_0-1706082628840.png

Thanks

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @_Manoj_Kumar_ 

 

I was able to achieve this , i checked the handlebar documentation.

arpangarg_0-1706289481419.png

Using {{!-- This comment may contain mustaches like }} --}} its possible.

View solution in original post

3 Replies

Avatar

Community Advisor

Hello @arpan-garg 

 

<!-- helper function --> is the correct. It is just that the syntax highlighting is not working in the UI.

 

The helper function is a  server-side code and will be available in the email but will not be visible to the email recipient because it is commented out by a client-side syntax/code.


     Manoj
     Find me on LinkedIn

Avatar

Correct answer by
Community Advisor

Hi @_Manoj_Kumar_ 

 

I was able to achieve this , i checked the handlebar documentation.

arpangarg_0-1706289481419.png

Using {{!-- This comment may contain mustaches like }} --}} its possible.

Avatar

Employee

You can use it as follows

{{!-- {%= toHexString(158) %} --}}