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've got a Claro subtheme that just changes a template and makes the sidebar_first region available, but for some reason, dropbuttons don't work anywhere on the site when this theme is enabled. I haven't made any styling changes at all. Here's my .info.yml:
name: DD Claro
type: theme
base theme: claro
description: 'Extensions to the Claro admin theme.'
alt text: 'Screenshot of Claro, Drupal administration theme.'
package: DD
version: '8.x-1.0-alpha5'
core: 8.x
regions:
header: 'Header'
pre_content: 'Pre-content'
breadcrumb: Breadcrumb
highlighted: Highlighted
help: Help
content: Content
page_top: 'Page top'
page_bottom: 'Page bottom'
sidebar_first: 'First sidebar'
Is there some way to get dropbuttons working?
Comments
Comment #2
saschaeggiYou'll have to extend all the libraries for now. so your
YOURTHEME.info.yml
must contain the following (additionally to your code):Let me know if this works for you :)
Comment #3
cweagansThank you so much! That worked perfectly.
This kind of smells like a core bug. Do you happen to know why this is needed? Is it a Claro specific thing? Is it worth opening a core issue for?
Comment #4
saschaeggiAs far as I know Drupal doesn't support sub-themes for Admin themes. But I might be wrong on this.
Comment #5
saschaeggiComment #7
idflorin CreditAttribution: idflorin commentedDo you have a Claro subtheme? I'm interested in one with a right sidebar and a footer,
Comment #8
cweagans@idflorin We do, but it's just an internal thing. We haven't published it anywhere. We just added the extra region in page.html.twig like this:
and added some CSS to float the sidebar right:
It's not pretty, but it works. We're planning on moving away from Claro in general eventually, but maybe this is enough to help get you what you want.
Comment #9
idflorin CreditAttribution: idflorin commented@cweagans Thanks. This was just what I need.
Comment #10
saschaeggi@idflorin @cweagans you might want to have a look at Gin which is based on Claro but features a more modern layout (with sidebar). => https://www.drupal.org/project/gin
Comment #11
Lukas von BlarerWow, that is ugly... Is the an issue to tackle this in core?
Here is an updated .info.yml code since claro is in core an lots of new library stuff happened in the meantime:
Comment #12
saschaeggiAdding a reference to the related open ticket for this
Comment #13
ojchris CreditAttribution: ojchris as a volunteer and commented@saschaeggi thanks for sharing gin. I tried Claro as default, kind of love it (also cool as admin) and was thinking I might just need a subtheme to make some changes to the default for sidebars, etc.
May suggest merging some UI elements from https://www.drupal.org/project/mediteran esp. the admin menu. Thanks
Regards,
Ojchris
Comment #14
peterkokot CreditAttribution: peterkokot commentedThis is quite a horrible solution :) Shouldn't this issue be like reopened or reported via a new one maybe?
Comment #15
saschaeggi@peterkokot this will be solved once Claro is the new default admin theme in core. For the meantime this is the only solution and admin themes do not officially support subthemes (as far as I know).
Gin uses similar overrides => https://www.drupal.org/project/gin
Comment #16
peterkokot CreditAttribution: peterkokot commentedThank you, @saschaeggi for your patient and insightful answer... Sounds good then.
Comment #17
davidwhthomas CreditAttribution: davidwhthomas commentedIn the meantime, here's a new version for the subtheme.info.yml include, based on current claro.info.yml
Comment #18
Pandepoulus CreditAttribution: Pandepoulus commentedThis last one did not did the trick for me, the tabledrag library, which is extended in claro, is overriden in that list so the original content from core.tabledrag is not added.
This one worked for me.