qzminski/contao-template-override — pull request #1 by tristanlins (2012-04-28 05:46:05+00:00)
Title: Fix the logic

You have a little logic issue in your code.

Inside of every dca/* file, you are allready inside of the function Controller::loadDataContainer!
Calling loadDataContainer inside of a dca/* file will just do nothink. Your luck the function use caching, otherwise it would end in an endless loop ;-)
https://github.com/contao/core/blob/2.11.x/system/libraries/Controller.php#L2761

Your palette replacement logic even not working well, you only replace palettes that are defined in modules before template-override. Later modules will not be extended. Thats a subsequent fault because the DCA is not completely loaded if you are inside of a dca/* file.

I replaced the logic with an onload callback.

At last i added a german translation ;-)