eZ Community » Forums » eZ Platform » override default field_templates
expandshrink

override default field_templates

override default field_templates

Friday 30 September 2016 3:00:08 pm - 2 replies

Hello everyone,

I'm new to Ez Platform so I have some problem to perform common tasks.

As I've ready in this topic: http://share.ez.no/forums/ez-publish-5-platform/ez-2014.07-image-alias-original-width-and-height I'm trying to override EzPublishCoreBundle::content_fields.html.twig to make original image variation work but with no  luck.

Adding either

 

parameters:
    ezsettings.default.field_templates:
        - { template: IsmCommonBundle::pippo.html.twig, priority: 0 }

or

 

ezpublish:
    system:
        default:
            field_templates:
                - { template: IsmCommonBundle::pippo.html.twig, priority: 0 }

does not work.

Is there a right way to accomplish such task?

Friday 30 September 2016 3:14:48 pm

Hi Matteo,

your problem might come from the priority set to 0.
Following code works fine with my installation:

system:
    default:
        field_templates:
            - {template: IntProgDesignBundle:fields:content_fields.html.twig, priority: 255}

Modified on Friday 30 September 2016 3:15:37 pm by Steve Konrad

Friday 30 September 2016 4:03:15 pm

It works!

Many thanks.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from