Discover the power of the Twig templating engine used by Tebex.
Templates on the Tebex platform are written in the Twig Templating Engine. Twig allows you to customise your store with control structures, similar to any other language, while maintaining a sandboxed and safe environment for the Tebex infrastructure.
You're able to learn more information about the syntax of Twig by viewing the official documentation.
A common Twig file may look like the following:
If you're interested in becoming a pro at the Twig syntax, you can complete the official Twig certification programme.
The available control structures within Twig.
Tags are control structures within Twig. They allow you to change the flow of code within your template.
If you'd like access to a TWIG tag that is not available below, please let us know.
Tag | Documentation |
---|---|
View the available functions within your Twig template.
Functions generate content for you to use within your templates.
If you'd like access to a TWIG function that is not available below,
Function | Documentation |
---|
__
Returns the equivalent translation from within your translations settings.
_p
Returns the plural translation from within your translation settings.
config
asset
Returns the full url path of an asset from within your template.
path
Returns the full url path of the current page.
query
Returns a GET parameter from the current url.
Modify variable values with Twig filters.
Returns a config value from your .
if
for
block
extends
include
set
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|