madeyourday / contao-rocksolid-custom-elements

RockSolid Custom Elements Contao Extension
http://rocksolidthemes.com/de/contao/plugins/custom-content-elements
MIT License
48 stars 12 forks source link

Configuration for differenct source directories per element #132

Open cmartin6 opened 3 years ago

cmartin6 commented 3 years ago

The amount of config and template files increases on and on. It would be nice to have some sort of own template/config structure per element. This would also make it a lot easier to reuse the elements for different projects.

For example in /templates/customelements:

An idea would be to set those configurations per element in /config/config.yml...

ausi commented 3 years ago

The custom elements extension currently uses a regular content element class inheriting from Contao\ContentElement and therefore uses the template loading mechanism as every other content element in Contao.

This makes it possible to provide different templates in themes for the same custom element for example.

To make it work as in your example I think Contao would need to support subfolders for templates itself.