Functions and Variables for use in Twig

With Zenario 7.3 onwards, you can use the simple server-side programming language Twig. If you're familiar with PHP, Twig is a doddle. It provides a secure environment by only allowing access to a controlled set of server-side functions.

You can do this either by:

  • using a Raw Twig Snippet plugin, which lets you edit a complete Twig script
  • editing the framework of any plugin, provided that plugin's framework is Twig-based.

CMS Environment Variables for use in Twig

These CMS variables are available in your Twig code when writing frameworks

CMS Functions for use in Twig

These CMS functions can be called from your Twig code when writing frameworks

Plugin Environment Variables for use in Twig

These variables from your plugin are available in your Twig code when writing frameworks

Plugin Functions for use in Twig

These functions from your plugin can be called from your Twig code when writing frameworks

Plugin Initialization Functions for use in Twig

These are functions that change how your plugin or the page is displayed.

They can only be used in your code in Twig Snippets, not frameworks, and only from version 7.4 onwards.