1
votes

I have the latest (1.0.0-dev) Sylius with the latest LTS Symfony (2.8.9) installed and I am trying to understand how to override any of the tepmplates. I found this guy https://www.youtube.com/watch?v=FbujTxpd3WY but this seems outdated.

For understanding it, I would like to change the <title> from Sylius to something else.

AppBundle.php

<?php

namespace AppBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class AppBundle extends Bundle
{
    public function getParent()
    {
        return 'SyliusShopBundle';
    }
} 

Folder

Folder

layout.html.twig (to override)

<title>MYNEWTITLE</title>

but even after php app/console cache:clear it does not change. Can anyone point me to a recent tutorial or have a look where I am wrong?

1
Have you added your AppBundle to AppKernel? - Jakub Matczak

1 Answers

2
votes

We do not recommend using Bundle's inheritance for this purpose, please use app/Resources folder to override or theming.

Have a look here: http://docs.sylius.org/en/latest/customization/template.html

For theming, here: http://docs.sylius.org/en/latest/bundles/SyliusThemeBundle/index.html