getkirby / ideas

This is the backlog of ideas and feature requests from the last two years. Use our new feedback platform to post your new ideas or vote on existing ideas.
https://feedback.getkirby.com
20 stars 0 forks source link

Have a theme folder for templates, snippets and assets #579

Closed gagarine closed 4 years ago

gagarine commented 4 years ago

I think everything related to front-end of the website should be in a theme folder. Somethings like that.

lukasbestle commented 4 years ago

We had a discussion around this a while ago, but unfortunately I don't remember where.

The conclusion was: As Kirby sites are mostly custom-built, the use-cases for theme bundling are limited. It's not like with other CMS where themes can be swapped in and out.

So a theme folder is likely not going to become the default for Kirby sites. An option could work, but it would make the CMS code more complex and I currently don't see that this will be used by many users.

But you can implement the feature yourself in a plugin: Plugins can register all types of extensions, so you can loop over all files and register them in your plugin. Please note that the performance will be slightly lower, but that would also be the case if we added support for this in the core.

gagarine commented 4 years ago

The conclusion was: As Kirby sites are mostly custom-built, the use-cases for theme bundling are limited. It's not like with other CMS where themes can be swapped in and out.

I understand this is not the same than other CMS. But still, I think it would be helpful to organize everything front-end related in a folder. One could use it to put npm package used to build the theme for example. Also if you do a migration from one theme to another, you could then quickly change between one or another. It would make concept such as "snippets" self-explanatory.

bvdputte commented 4 years ago

You already can do this if you want: