This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » How to "override overrides"

How to "override overrides"

How to "override overrides"

Tuesday 17 June 2014 10:11:53 am - 4 replies

In the eZ demo bundle the ezdemo.yml file overrides the full view of a blog_post. Is it possible to override this override in my own bundle without having to remove the declaration in ezdemo.yml?

In legacy this was possible due to the order of how extensions were loaded. I'm currently loading my own settings file using the prependExtensionConfig method of the container in my bundle's extension class, but there might be another way to do this in order to have my settings override those of ezdemo.yml.

Any ideas?

Tuesday 17 June 2014 10:46:03 am


I do it on my MetalFrance project. The trick is mainly to import your config files from main ezpublish.yml, so using explicit loading.

Tuesday 17 June 2014 11:07:00 am

Hi Jerome,

Thanks for the tip! My initial thought was to try and keep the bundle self-contained without having to modify any outside code. Your approach would work, but so would removing the duplicate declaration in ezdemo.yml. I guess your approach might be considered "more" best practice?

Actually, the the behaviour produced by importing the YAML file was what I expected from using the method in the extension class, since it's named prependExtensionConfig.

Tuesday 17 June 2014 4:40:50 pm

Did you try swapping the loading oredr of the bundles in kernel.php ?

Wednesday 18 June 2014 8:17:11 am

Hi Gaetano,

It seems that did the trick! Loading my custom bundle before the eZSystemsDemoBundle seems to result in my config files taking presedence.

Thanks a lot!


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

36 542 Users on board!

Forums menu

Proudly Developed with from