Template sub-folders

Is it still impossible to group templates into subfolders? At least without major hacks?

No, organizing templates in folders is not possible, unless you register them in a plugin.

For example, create a file tpl.php in /site/plugins/tpl with the following content:

<?php
$kirby->set('template',     'blog',     kirby()->roots()->templates() . '/blog/blog.php');

And so on. This would allow you to store your blog template in a blog subfolder in /site/templates/-

Damn, was afraid of that. Have to try a file prefix naming.

Do you have many page types that request different templates? Big sites I’ve worked on use 20-30, that’s still a manageable amount of files to have in site/templates.

If you use PHP files for parts of your pages, components, etc., you can use snippets (in site/snippets), or you can put them in arbitrary subfolders in your template folder (e.g. site/templates/parts, site/templates/components) and include them.

It’s less about total numbers of templates and more about my own neurotic tendencies. I get pretty “retentive” about stupid stuff like that.