2

I am attempting to create a subtheme using showcase_lite as a base theme. For now there will be mostly just CSS alterations in the subtheme.

To start, I created just an .info.yml file to start with:

name: My Subtheme
type: theme
description: 'Subtheme for testing'
core: 8.x
base theme: showcase_lite

Most inheritance works fine (CSS / JS / Twig), but it seems that the preprocess functions in the base .theme file are not called anymore. I am talking about _preprocess_html() for example.

Is this expected behaviour? If so, how could I have these be called from my own theme, without copypasting them all?

1

Subtheme inheritance is a bit different in D8. I believe you are running into expected Drupal 8 Theming behaviour.

In D7, the parent theme's functions were called, followed by the subtheme's preprocess functions - I hope this is still the case, but it seems from your troubles that it might not be.

When in doubt, just duplicate the corresponding file in your subtheme.

Here's some more reading on the subject:

|improve this answer|||||

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.