Skip to main content

Notifications

Power Pages - General Discussions
Answered

Liquid include tag usage

Like (1) ShareShare
ReportReport
Posted on 12 Sep 2024 16:18:28 by 138
I have a web template as base layout.  In the web page code, I enter this code to insert a content snippet.  
{% include one_test_snippet %}, but isn't found when rendered.
 
NOTE: I also tried it with single and double quotes around snippet name.
 
So, what is the syntax for pulling in a content snippet?
 
Thanks,
Doug
 
Categories:
  • Verified answer
    Fubar Profile Picture
    Fubar 7,647 on 12 Sep 2024 at 21:44:10
    Liquid include tag usage
    Include is usually used for including another Web Template (but believe it can be used for Content Snippets also using the correct format), for a Content Snippet you should be able to one of the following
    {{ snippets["<<snippet name>>"] }}
    
    or 
    
    note: replace only the <<snippet name>> in the below the first snippet_name is a keyword
    {% include 'snippet' snippet_name:'<<snippet name>>' %}
    I have never used the Include but do use the snippets one.

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,316

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,290

Leaderboard

Featured topics

Loading complete