How would I reference a Web File in a Web Template using Liquid?
To reference a Content Snippet in a Web Template using Liquid, I would apparently enter
{% include 'snippet' snippet_name:'AccountData' %}
Solved! Go to Solution.
Can you try a different syntax:
{{ snippets['AccountData'] }}
Don't forget to clean the portal cache after making changes.
Also if you have multiple languages on the portal make sure that language of the snippet matches language of the open page.
Hi @mobicycle ,
You cannot reference Web File in liquid. Web File can be accessed via URL that you specify for it. What exactly do you want to achieve?
I just wanted to know if it was possible to reference a Web File in a Web Template.
Can you give an example of how you would reference the Web File in the Web Template?
I want this html code to appear where the reference is
<p> This is my sample code </p>
You can create a content snippet of HTML type and then reference it in your liquid code.
I am aware of Content Snippets, which is why I wrote earlier -
To reference a Content Snippet in a Web Template using Liquid, I would apparently enter
{% include 'snippet' snippet_name:'AccountData' %}
This method did not work for me, however.
Can you try a different syntax:
{{ snippets['AccountData'] }}
Don't forget to clean the portal cache after making changes.
Also if you have multiple languages on the portal make sure that language of the snippet matches language of the open page.
I have deleted the apps as I feel this platform is too early stage for me, and the customer support unsuitable, but I will mark your response as the solution as others may find it helpful.