Snippet rendering in Power Pages (again) – there is more to it

By | August 8, 2024

I love subtle differences in how various features work. They make my life miserable sometimes, but they also give me some advantage. I can even beat copilots… since how would AI know about such things?

I blogged about snippets rendering recently: https://www.itaintboring.com/power-platform/power-pages-snippet-rendering-3-options-3-different-html-outputs/

Turned out there is more to it.

Look at the liquid below and look at the output:

There is TestValueSnippet, and there is TestValueWebTemplate, both have the same liquid code:

Snippet value: {{testVariable}}

You’d think they’d produce the same output, but, as it turns out, it depends on how that snippet is included. Notice how a snippet included with {{snippets[”]}} syntax does not seem to have access to the liquid variable defined in the “parent” component. Although, when it’s included with “include”, it’s all good.

Leave a Reply

Your email address will not be published. Required fields are marked *