madeyourday/contao-rocksolid-custom-elements

Configuration for differenct source directories per element

cmartin6 opened this issue · 1 comments

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:

  • /linkbox/rsce_linkbox_config.php
  • /linkbox/rsce_linkbox.html5
  • /employee/rsce_employee_config.php
  • /employee/rsce_employee.html5

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

ausi commented

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.