contao-bootstrap / buttons

Bootstrap 3 Contao 3 Buttons Component
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Use Hybrid class to make "bootstrap_button(s)" content element a module too #1

Closed sebj54 closed 6 years ago

sebj54 commented 8 years ago

Is it possible to make the Netzmacht\Bootstrap\Buttons\ContentElement\ButtonElement class extends Hybrid instead of ContentElement? This will allow to use buttons content elements as a module. Of course, it will be necessary to add DCA fields in tl_module.

I will be able to do this in the future but I don't have the time at the moment and I also wondered if my changes would be added in your project if I did it.

Thanks in advance!

dmolineus commented 8 years ago

I'm not quite sure if the buttons should be available as frontend modules. Imho modules are more application like instead of displaying content. So I tend to not implement buttons as a frontend module. Buttons are so simple so it's maybe better to use a module type html maybe with an insert tag.

But maybe you can convince me to add it. :)

sebj54 commented 8 years ago

I agree with you on that point: modules are application components.

But it is really useful when you want to add a button in containers (like header, footer or sidebar) that are not articles. Without frontend module, you have to create an article in those containers and repeat the button on each page :(

Hope it will convince you!

dmolineus commented 8 years ago

Stil Not Sure. Do you extensions like boxes4ward where you can define content slots? https://github.com/psi-4ward/boxes4ward

sebj54 commented 8 years ago

It seems more like a workaround to me. If I correctly understood: instead of creating a button for each page, I have to create it for one article and then tick the boxes for the pages I want this article to appear in?

Modules are native in Contao and it would be too bad to not take advantage of these functionnalities. Plus, developping the ability to use buttons as a module would not remove the ability to use it as a content element.

And like I said in first post, I can develop it and make a pull request 😉

dmolineus commented 6 years ago

I won't add any more features to v1. At the moment it's not planned to migrate the buttons component to contao4.