I added a preprocess because if we have enable gin theme and gin_toolbar custom icon works fine but if you have another theme for no admin pages for example will show the default icon.

Comments

fastangel created an issue. See original summary.

a.dmitriiev’s picture

StatusFileSize
new4.75 KB

In case you use gin as base theme for your admin theme, it is not enough to get setting of gin theme directly, you need to get the setting of current admin theme. The patch includes this and also the change from the template for menu toolbar from related issue https://www.drupal.org/node/3121437

a.dmitriiev’s picture

StatusFileSize
new4.75 KB

Fixed typo in function name

a.dmitriiev’s picture

fastangel’s picture

StatusFileSize
new3.01 KB

Here a patch for the beta5

saschaeggi’s picture

Hey thanks to you both for your work on this! It's on my todo list for reviewing :)
But this should go into the Gin theme itself as this module is really just a wrapper module which injects styles into the frontend when you're logged into Drupal. Therefore can we close this as a duplicate to #3121437: Custom logo in toolbar?
Thanks again :)

Sorry I just saw this enables the feature, sorry my fault.

a.dmitriiev’s picture

The patch is needed if your admin theme uses Gin theme as base theme and also provides the variables for toolbar template.

saschaeggi’s picture

StatusFileSize
new735 bytes

Updated patch to match the new patch in the main ticket.

a.dmitriiev’s picture

@saschaeggi why do you force the theme setting to be from 'gin' theme only? what if there is custom admin theme that is based on gin? With the patch from #3 or #5 it is still possible to use any custom theme based on gin. As in this issue https://www.drupal.org/project/gin_toolbar/issues/3139152 we make sure that Gin is installed, it is safe to have theme_settings not restricted to 'gin'

saschaeggi’s picture

StatusFileSize
new1.23 KB

Sure we can check that, so you can subtheme Gin as well.
New patch attached.

a.dmitriiev’s picture

Thanks, for adding this in, but there are more settings in gin_toolbar_preprocess_html :) Please also add them as well. You can check patch in #5 as a reference.

saschaeggi’s picture

StatusFileSize
new2.91 KB

@a.dmitriiev updated the patch for subtheming. Please review

saschaeggi’s picture

Status: Needs review » Reviewed & tested by the community

Tested by breidert in #3121437: Custom logo in toolbar

  • saschaeggi committed b43dad0 on 8.x-1.x
    Issue #3129304 by saschaeggi, a.dmitriiev, fastangel: Allow use custom...
saschaeggi’s picture

Status: Reviewed & tested by the community » Fixed

Included in dev, thanks for your effort!

a.dmitriiev’s picture

Thank you @saschaeggi, great job!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.