0

I'm trying to build a custom module by overwriting Contao's comments module.

In localhost so far so good. But, when I push to remote, Contao's comments module seems to be called after my custom module and so my module isn't rendered anymore. (I detected call order with var_dumps).

Why is Contao's comments module called after mine? Can we change the module call order?

Thx everyone !!

Mac
  • 1,432
  • 21
  • 27

1 Answers1

0

Yes, you can do that via the getBundles method of your Contao Manager Plugin of your bundle within the Contao Managed Edition:

/**
 * {@inheritdoc}
 */
public function getBundles(ParserInterface $parser): array
{
    return [
        BundleConfig::create(MyBundle::class)
            ->setLoadAfter([
                ContaoCommentsBundle::class
            ]),
    ];
}
fritzmg
  • 2,494
  • 3
  • 21
  • 51