1

I have a Drupal 8 base theme and a subtheme. There are 3 sites with different DB's that will share this single subtheme.

Each site will use different JS scripts (eg: Google Tag Manager, Parse.ly) that are typically added in html.html.twig and each site will also use JS files that have site-specific code.

It's hard to find documentation on D8 regarding this, but the closest idea I can come up with is either somehow doing this with theme settings or it needs to be done with a custom module that calls these specific files/scripts from the subtheme based on whichever domain/site you're on.

How can I set this up?

  • One idea would be to have your sub-theme handle all the heavy lifting and then have a sub-sub-theme for each individual site that simply contains the overridden JS and template files. Any main tasks, JS and Sass / CSS can all be handled in your main sub-theme. Thus the sub-sub-themes are very minimal and inherit most things from your main sub-theme. – Danny Englander May 29 '16 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.