I have a Drupal 8 Multisite setup with the following Folder structure:
- themes
- custom_theme
- main_custom_theme
- custom_theme
- sites
- site1
- themes
- subtheme1
- themes
- site 2
- site1
So I want both sites to use main_custom_theme, but site1 needs to override one template (page.html.twig) with subtheme1. subtheme1 folder contains a subtheme1.info.yml as follows:
name: subtheme1
description: "Custom sub-theme"
core: 8.x
type: theme
base theme: main_custom_theme
I rebuilt all caches (Backend and drush cr, but drush cr might not clean caches of subsites?) but cannot select the new subtheme in Backend of site1. What am I missing?
This is the Twig Debug output after using leymannx answer, subsites path is "leistungen"
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'page' -->
<!-- FILE NAME SUGGESTIONS:
* page--leistungen.html.twig
* page--node--560.html.twig
* page--node--%.html.twig
* page--node--article.html.twig
* page--node.html.twig
x page.html.twig
-->
<!-- BEGIN OUTPUT from 'themes/custom/my_custom_theme/templates/main/page.html.twig' -->
I have a question that builds on this one... I published it appearently with a different user, without wanting to. Still new to not only reading stackexchange :)
If I try to do the same for the node of my content type, which is using a template named node--CONTENTTYPENAME.html.twig at the moment, I can insert a name suggestion node--NAMEOFSUBSITE.html.twig, which will then be used for ALL nodes. I'd like to insert a suggestion such as node--CONTENTYPENAME--NAMEOFSUBSITE.html.twig, for only this one nodetype.
How can I do that?
Thanx in advance!!
themes/custom/my_custom_theme/templates/main
there is apage--leistungen.html.twig
?themes/custom/my_custom_theme/templates
as well? Really strange then. I'd say it's caching. But you said you already flushed all Drupal caches.drush cr
anddrush -l leistungen cache:rebuild
I think it's caching, too. But wondering, why other template changes are recognized? It's weird.