Twig Tastics


Twig tastics can be used as an alternative frontend to purely use server side rendering and optionally skip client side JavaScript entirely.


To make use of this you have to take two steps. First enable the TwigTasticsBundle. For this add the following bundle to the config/bundles.php in your project:


return [
    new Frontastic\Catwalk\TwigTasticBundle\FrontasticCatwalkTwigTasticBundle(),

aThen you have to manually overwrite the generic render template templates/render.html.twig to use the Twig rendering:

{% include '@Tastic/render.html.twig' with { node: node, page: page, data: data } %}

You can additionally remove all JavaScript from the src/js/index.js, except for the service worker and SCSS include:

import { registerServiceWorker } from 'frontastic-common'

import '../scss/app.scss'