Overwriting modules at frontend / backend

Hey, guys!

I’ve been working with the builder and I loved how easy is to overwrite an existing module in a theme. For example, I’m working on a project where I replaced the button module with my own implementation. When I insert a standalone button, it works ok, and I can see my custom module settings at the backend.

But, as I’m seeing, other modules use too the button module. For example, the call to action module. At the frontend, the call to action module uses my custom module, and that’s awesome. But at the backend, the settings of the default button module aren’t replaced by my custom settings.

Can you guys take a look at this issue?

Thanks!

Hey Diego,

That’s something we didn’t consider when implementing the ability to overwrite modules. I can see how it would cause some issues. Can you send me a copy of your button module to test? My email is justin [at] fastlinemedia [dot] com.

Thanks,
Justin

Hi, Justin,

Thanks for the reply! I just sent you a .zip file with my custom module. It’s a very simple implementation, I change the button styling through the theme’s css using custom classes that I set via module settings. I know that I could work it out using the default button module, but I’m trying to adapt the builder to my workflow.

Thanks!

Diego

Thanks, Diego. I should be able to look into this within the next day or so. I’ll let you know how it goes.

Justin

Hey Diego,

I looked into this and the issue is that the settings are defined for each module to give us maximum flexibility when embedding one module within another. For example, if we didn’t do it this way, all of the button settings would be present in any module we embed it in. Not all button settings (or the way they are displayed) make sense for every module. This allows us to only use the button settings we need in modules like the callout.

Unfortunately, aside from a rather large rewrite the only way around this currently would be to overwrite the other modules as well.

Sorry we don’t have a better answer at this time!

Thanks,
Justin

Hi, Justin,

I understand your point about a major rewrite, this is a huge plugin that makes a lot of things, and it’s not easy to do a rewrite. So, for now I’m ok with overwriting each module that I use.

But, I think that this should be one thing to consider for the future of Beaver Builder. The entire plugin uses very well the concept of modular layout. And the idea of create custom modules or modify / overwrite the default ones is very appealing. If the modules itself were built using this modular concept (where you could use other modules together to create a custom one), the sky would be really the limit for Beaver Builder.

Just you guys take some time to think about it, ok? Maybe could be a way to intercept and change the array of settings that creates the modules, this way one could control (and add) the options that shows in each module. What do you think?

Anyway, thanks for your answer!

Hey Diego,

No problem. We’ll definitely consider it in the future! Thanks for the feedback.

Justin