eZ Platform Discussions

[2.2] vs [2.1] Settings

version22

#1

Bonjour,

My template MyBundle:fields:content_fields.html.twig was no longer supported.

In my src/Edb/MyBundle/DependencyInjection/MyExtension.php file :

    public function prepend( ContainerBuilder $container )
    {
        foreach (['custom_tags.yml' , 'template_rules.yml', 'ezpublish.yml'] as $f) {
            $configFile = __DIR__ . '/../Resources/config/'.$f;
            $config = Yaml::parse( file_get_contents( $configFile ) );
            $container->prependExtensionConfig( 'ezpublish', $config );
            $container->addResource( new FileResource( $configFile ) );
        }
    }

And in src/Edb/PressePro3Bundle/Resources/config/ezpublish.yml :

system:
    default:
        field_templates:
            -
                template: EdbPressePro3Bundle:fields:content_fields.html.twig
                priority: 10

It was well taken into account in the 2.1. but here it is ignored.

So I had to put my settings in app/config/ezplatform.yml.

But I don’t like to modify this file. I prefer to leave it as vanilla as possible to have less pb to manage during upgrades.


#2

Uh… In fact, even like that, it is not taken into account…