Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I can install and set the sub-theme as active. I get no errors during this process.
However some things in the admin interface are not rendered, for example the content tabs in the content overview (see attached screenshot).
Am I missing something here, are there specific sub-theme instructions for adminimal, or is this a bug?
this is my *.info.yml file
name: zap admin
type: theme
description: Sub-theme of adminimal
core: 8.x
base theme: adminimal_theme
thank you!
joris
Comment | File | Size | Author |
---|---|---|---|
content_tabs.png | 18.81 KB | joske_zap |
Comments
Comment #2
gpap CreditAttribution: gpap at Brainsum for Tieto commentedHave you checked the block layout page on
/admin/structure/block
?Comment #3
joske_zap CreditAttribution: joske_zap commentedYes, but primary tabs and secondary tabs which are available in the adminimal theme (admin/structure/block/manage/adminimal_theme_primary_local_tasks), are not available in the sub-theme...
Comment #4
aheredia CreditAttribution: aheredia commentedHi seems that you have to copy config/install and config/opitonal files in your subtheme.
Rename the files accordingly block.block.adminimal_theme_breacrumbs.yml to block.block.subthemename_breadcrumbs.yml.
Remember to do the same inside each file to.
Hope this help you
Regards
Comment #5
ANDiTKO CreditAttribution: ANDiTKO as a volunteer commentedCheck what @aheredia said and let us know if it worked, Thanks!
Comment #6
zarexogre CreditAttribution: zarexogre as a volunteer commentedI have copied over the config files, changed the file names and the theme within the files and still no joy. The blocks layout section is empty, love to be able to sub theme adminimal!
Comment #7
Nick Hope CreditAttribution: Nick Hope commentedI wanted to tweak a few css settings in the adminimal theme by implementing a sub-theme but I also ran into this problem. After initial trouble, I tried copying over the entire
config
folder and changing all the instances ofadminimal_theme
in the files within it, but still got problems. Eventually I had cloned almost the whole theme and it still wouldn't work. So I gave up and just hacked the Adminimal theme itself, adding a "nick-tweaks.css" file in thecss
folder, and adding it inadminimal_theme.libraries.yml
.Comment #8
bgm CreditAttribution: bgm at Coop SymbioTIC commentedWorked for me: Copying over the 'config' directory and renaming both the files and their contents (as suggested by @aheredia in #4).
Comment #9
jsst CreditAttribution: jsst at Ibuildings commentedAs per https://www.drupal.org/docs/8/theming-drupal-8/creating-a-drupal-8-sub-t..., paragraph "Inheriting Block Placement", copying over the config folder should not be necessary. Copying the folder to the subtheme as suggested in #4 and #8 doesn't work for me either. I copied the install/* configuration to my CM export (config_installer / config/syc) and that does work.
This seems to be a core issue: https://www.drupal.org/project/drupal/issues/2635978
Comment #10
aheredia CreditAttribution: aheredia commentedNormally should work after reinstalling the theme after doing what its suggested in #4
Comment #11
Ger O'Brien CreditAttribution: Ger O'Brien commentedModifying the config/optional files as advised by @aheredia at #4 worked for me. Thanks.
Comment #12
japo32 CreditAttribution: japo32 as a volunteer commentedSame here. #4 works.
Comment #13
gnuschichten CreditAttribution: gnuschichten at ETECTURE GmbH commentedRenaming all theme names within the config files, as suggested in #4, works for me. Thanks!
Comment #14
bharker CreditAttribution: bharker commentedI had to copy the config files and rename as mentioned in #4 in order to get my sub-theme functioning, all seemed well until I noticed that the
secondary_local_tasks
block doesn't seem to be rendering in thepre_content
region. I do get the other regions including breadcrumbs and local_actions blocks. Can anyone else confirm they are seeing thesecondary_local_tasks
in their sub-module?Comment #15
bskibinskiSome extra info, and an easier fix below, this isn't adminimal's problem, this is all Drupal themes:
An easier way of fixing this without copying (thus overriding) all block files is to implement this code-snippit in your subtheme, and change the block prefix to match (code snippet below) in your *.theme file:
Also don't forget to copy the regions into your .info file, your subtheme doesn't inherit regions from the base theme.
Comment #16
Joe HuggansCouldn't get #15 working.
However I have got this working now using the suggestion from #4, however you need to include the regions from the adminimal theme in your subtheme or as reported in #14 there are some secondary local tasks missing.
As far as I can tell this is now working
I've created a Git Repo here for reference
Comment #17
tonylegrone CreditAttribution: tonylegrone commented#4 and #15 together are the fix. The theme must be uninstalled and reinstalled in order for the code changes to work though. For anyone else having trouble with it, make sure you go through that process. Also, maybe I'm missing something, but I couldn't find any way to uninstall a theme in the UI. I had to do it with
drush theme:uninstall theme_name
.