I want to avoid using hook_install()
so I can install from configuration.
I'd like my install profile to use seven
for the admin theme, and my custom theme rutherford
for the default/main frontend theme.
The annotated *.info.yml
example on Drupal.org suggests that putting the following will install my themes:
# List any themes that should be installed as part of the profile installation.
# Note that this will not set any theme as the default theme.
themes:
- rutherford
- seven
My understanding of CMI is that I can then create a file called www/profiles/rocket/config/optional/system.theme.yml
and put this in it to enable my themes:
admin: seven
default: rutherford
However none of this seems to work? My themes are found, but not installed or enabled:
Edit:
I've just noticed that the themes are set as default and admin, they're just not installed:
www/profiles/rocket/config/install/system.theme.yml
. I've based my profile off Standard but it seems to behave differently, for example copying theblock.block.seven_breadcrumbs
fromwww/core/profiles/standard/config/install/block.block.seven_breadcrumbs.yml
and putting it in my profile'sconfig/install
directory gives me a UnmetDependencyException without fail, whereas Standard seems to get away with it somehow!hook_install
to get my themes installed too. Can't remember why, but I definitely would've tried to do it config first (my thought process is very similar to yours). Maybe there's a bug