What are twig functions?

Twig functions are reusable functions that can be called from within Twig templates to perform a specific task or return a value.

They are typically used to keep template logic simple and readable by moving more complex or reusable operations into functions. A Twig function can accept parameters, perform some processing, and return a result that can then be used in the template.

For example, you can use {{ store_name() }} in twig to output your store's name.

See here for a list of all available twig functions, and here for how to add your own.


Revision #1
Created 2026-09-25 06:52:54 UTC by Ethan Payne
Updated 2026-09-25 06:56:09 UTC by Ethan Payne