You can’t create a custom function in Power Pages liquid, but you can get close enough


You can create web templates as components in Liquid to reuse code in multiple places. Although you can't create custom functions in Liquid, web templates can be used in a similar way. For example, you can define a template for tag replacement and use it in your Liquid code. You can also use the "capture" Liquid tag to assign the results to variables. The template can be included in a loop for each step, allowing for text replacement. The output can then be captured in a variable and added to the HTML output. While it takes some effort to define, this approach allows for reusable code in Liquid.


Article 7m

Login now to access my digest by 365.Training

Learn how my digest works
Features
  • Articles, blogs, podcasts, training, and videos
  • Quick read TL;DRs for each item
  • Advanced filtering to prioritize what you care about
  • Quick views to isolate what you are looking for right now
  • Save your favorite items
  • Share your favorites
  • Snooze items you want to revisit when you have more time