I have a requirement to show the Terms & Conditions on portal profile page.
So, I have been storing the T&C text in the contact field and showing that content in a modal.
Now, the requirement is to show the T&C based on the preferred language.
I thought of adding the T&C text in content snippets, but I don't have the faintest idea of how to display the content snippets in the javascript.
Can any of you suggest a way to achieve this? Is there any other way instead of:
1. storing the t&c text in a different entity with the language lookup and fetching that information using odata and displaying it in the modal
2. if I were to use content snippets, how would i use them in the script?
*This post is locked for comments
I actually used global variable. So, the same code is working.
Thank you.
I am actually not using JS files within the Web Files.. for this we need to enable CRM to allow JS as notes attachments, which in my projects I prefer not to
but even though.. I understand you are having a generic JS in the Web Files is that the case? I would imagine the same code should work fine there
Hi Oliver,
I'm only able to access content snippets from javascript if I write the script on the web page 'Copy(HTML)' or 'Custom Javascript'.
I'm not able to get the content snippets through the javascript code used in the webfiles.
Is there a way to get the content snippet value in the webfiles as well?
to get a content snippet through JS use the following syntax:
var title = '{{ snippets["YOUR SNIPPET NAME"] }}';
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156