Download the PHP package cvc/typo3-twig without Composer

On this page you can find all versions of the php package cvc/typo3-twig. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package typo3-twig

Twig Extension for TYPO3

Build Status GitHub license Packagist TYPO3 Version codecov

This TYPO3 extensions allows you to use the fabulous Twig template engine within your TYPO3 project.

You can use Twig templates in your Extbase controllers or in your TypoScript.

Version compatibility

The following table shows which versions of this package are compatible with which TYPO3 version.

Since Version 2, PHP 7.4 is required.

1.x 2.x 3.x
TYPO3 v12
TYPO3 v11
TYPO3 v10
TYPO3 v9
TYPO3 v8
PHP 8.3
PHP 8.2
PHP 8.1
PHP 8.0
PHP 7.4
PHP 7.3
PHP 7.2

Installation

This extension only works when installed in composer mode. If you are not familiar using composer together with TYPO3 yetyou can find a how to on the TYPO3 website.

Install the extension with the following command:

Getting started

Rendering of Twig templates works nearly exactly the same way as rendering Fluid templates.

In contrast to Fluid there are no "layouts" nor "partials" in Twig. Everything is "just" a template. Therefore there are some features missing that you are probably used by Fluid.

Render templates in TypoScript

To render a Twig template you can use the TWIGTEMPLATE content object. You can use it similar to the way, Fluid was used before. The variables are rendered as content objects and data processing is also possible.

Documentation

The full documentation is available here: cvc_twig Documentation.

Alternatives

This extension is not the first extension that supports rendering Twig templates. We decided to create our own extension, because other extensions were either not maintained anymore, they carried to much overhead or they were not developed close to the Fluid reference implementation.

In the table below you can find other extensions that provides an integration for the Twig template engine:


All versions of typo3-twig with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
twig/twig Version ^3
symfony/console Version ^5.4 || ^6.4 || ^7.0
typo3/cms-backend Version ^11.5.24 || ^12.4.2
typo3/cms-core Version ^11.5.24 || ^12.4.2
typo3/cms-extbase Version ^11.5.24 || ^12.4.2
typo3/cms-frontend Version ^11.5.24 || ^12.4.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cvc/typo3-twig contains the following files

Loading the files please wait ....