Needs review
Project:
Toolbar Menu
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2016 at 07:17 UTC
Updated:
19 Jan 2022 at 19:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
juliencarnot commentedWouldn't changing the default cog.svg to the more generic hamburger.svg and documenting the classes generated by the modules and the toolbar_menu/css/toolbar_menu.module.css (which could include the default hover variations to it) be easier and simpler?
Comment #3
farald commentedHm, can we have it react to classes defined as fields on the menu link entry?
I made a quick approach, since I only needed minor changes to existing logic.
Since ToolbarMenuMenuLinkTreeManipulators is a service, I swapped it out with:
And then using the ToolbarMenuMenuLinkTreeManipulators as base class.
Comment #4
dbiscalchin commentedHi,
This is a patch I made to allow configuring the icons used in the toolbar. It was created from the Git version of the code.
The file css/toolbar_menu.module.css could be deleted, but I did not in case someone else is using the library declared by the module.
Regards,
Comment #5
dbiscalchin commentedI've attached a screenshot of the configuration page.
It would be nice to upload images. However, I think it should be easily used programmatically too.
Comment #6
duneblI confirm #4 is doing the job...
Maybe the text under the icon path could leads to confusion:
Absolute URL path to the icon image. Leave it empty for no icon.Regarding the
Absolute URL pathtext: Maybe it should be like under the "logo" field (/admin/appearance/settings):Enter a path to an icon. Drupal will look for the file relative to the Drupal root or the public file system.With the exception that this path require a "/" at the beginning .
Comment #7
dunebl#4 apply with few warning on last dev:
Comment #8
sutharsan commentedThis is a very complex approach, I would rather have a symplistic solution using CSS classes as @falard suggested in #3.
Comment #9
mrpauldriver commentedI have used Font Awesome Menu Icons with some success.
Comment #10
dunebl#4 doesn' work in 9.x as it is using deprecated function :
file_prepare_directoryComment #11
duneblHere is an updated patch
Comment #12
duneblSome patch generation problem fixed.
Please review
Comment #14
duneblI really have a problerm with this patch... here is the correct version.
Sorry for the wrong patches.
Comment #15
duneblComment #16
crutch commented#14 - patch applies but is not saving the entries (urls). After saving, the icon does not appear and then when going back to edit the item the fields are blank. No errors.
Attempted to use: /core/misc/icons/bebebe/cog.svg and https://localhost/web/core/misc/icons/bebebe/cog.svg
D9.3.3
toolbar_menu 2.x-dev + #14