Can you please tell me what is wrong with this setup? I am trying to render content snippets
I have created a website, a web template for the website, a page template for the website, a webpage for the website and 4 content snippets.
My web template shows
snippet 1 - <p> I am snippet 1 </p>
snippet 2 - <p> I am snippet 2 </p>
snippet 3 - <p> I am snippet 3 </p>
snippet 4 - <p> I am snippet 4 </p>
My page template
My website
My webpage
I have seen this documentation but it seems to be for one website and one content snippet.
Customize content by using content snippets - Power Apps | Microsoft Docs
After you create a snippet with text, HTML, or liquid objects shown in the example above, you can use it in a portal page.
To do add snippet on a portal page:
Create a web template and use snippets liquid object to call the snippet you created.
Create a page template using the web template created earlier.
Use the portals Studio to create a new page using the page template created earlier.
Hi @mobicycle ,
There are two ways to use snippets:
{{ snippets["snippet1"] }} or {% assign myname = "snippet1"%} {{ snippets[myname] }}
or
{% editable snippets "snippet1" type:html %} as documented here: https://docs.microsoft.com/en-
us/powerapps/maker/portals/liquid/portals-entity-tags#editable ( i am never sure, whether you have to quote the name here or not )
the former just reads them, the latter lets you edit them in the frontend if you are allowed to.
Keep in mind, that {{ }} usually renders something on the page and {% %} is usually a statement.
May be, that is the problem.
Does this help?
Have fun,
Christian