web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Add Multiple Content S...
Power Pages
Unanswered

Add Multiple Content Snippets to HTML Body

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

 

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.

Web Template

My web template shows

 

{% include 'snippet' snippet_name:'snippet1' %}

{% include 'snippet' snippet_name:'snippet2' %}

{% include 'snippet' snippet_name:'snippet3' %}

{% include 'snippet' snippet_name:'snippet4' %}
 

Content Snippets

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>

 

Page Template

My page template

 

Website

My website

 

Webpage

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:

  1. Create a web template and use snippets liquid object to call the snippet you created.

  2. Create a page template using the web template created earlier.

  3. Use the portals Studio to create a new page using the page template created earlier.

 

Categories:
I have the same question (0)
  • Christian Leverenz Profile Picture
    1,214 on at

    Hi @Anonymous ,

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 46

#2
Valantis Profile Picture

Valantis 24

#2
omkarsupreme Profile Picture

omkarsupreme 24

Last 30 days Overall leaderboard