I extended some functionality in the slick module, but I am looking to do it in a way that doesn't get erased each time I update slick.

I added a css file and edited the slick skin php file to use the css file depending on the user's choice. I also added a bootstrap class to the slick.html.twig template so that the slider would disappear on mobile devices.

Should I make a custom module that acts like slick_examples?

3 Answers 3


In my opinion, the easiest way to preserve changes to contributed code is to manage your dependencies through Composer and use patches. When you update slick in the future, the output of the command will directly tell you which of your patches have been broken by the update.


As far a I can tell from your description of the changes you've made, you should be able to implement all of these in a custom module.

That should save you the trouble of patching existing modules.


i thought that you can override or extend controllers or plugin, its the only way to preserve the changes after updates

  • yep but also patches via composer
    – taggartJ
    Dec 4, 2019 at 3:25
  • 2
    Hi @Ahmed Matri and welcome to Drupal Answers. While your answer is not bad, it's too short and it's more a comment than a proper answer explaining the solution and why it's a good choice for the OP.
    – sanzante
    Dec 4, 2019 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.