Good way to handle multisite fallback templates So I've got a multisite going on.

For most of the sites, most of the time, they'll be using the same templates. But I want a good way to handle siteX needing one template to be different from the other sites.

For example, when going to siteX.com/news, I'd like for the template served to be siteX/news.html if it exists, otherwise default/news.html.

I know I could change the template path in the DB, but I'd rather keep it in the code for development/deployment simplicity.

I think I could could create custom routes, but I'd rather not create a route for every section.

At the moment I'm doing this by creating a root/news.html file, which just says

{% include [currentSite.handle ~ '/news', 'default/news'] %}


but it'd be nice to not have to do this for every template I create. It also seems inefficient to do this on a template level (though I don't actually know this to be true).

So the questions are:


(How) can I overwrite Craft's template resolver to do what I want?
Is this the best way to go about this?


Thanks!
You can create localized template files by placing them in a subfolder of templates/ named after the site handle.

See https://docs.craftcms.com/v3/dev/#template-localization for a full explanation.