When I visit /admin/index in Drupal, I'm presented with a list of menu items from Admin Toolbar Extra Tools.
I'd imagine that should be suppressed.
When I visit /admin/index in Drupal, I'm presented with a list of menu items from Admin Toolbar Extra Tools.
I'd imagine that should be suppressed.
Comments
Comment #2
adriancidThis page comes from core and show all the links available on each module.
Comment #3
wolf_22 commentedOne option is to copy the core/themes/stable/templates/admin/admin-block-content.html.twig file and put it in the current theme folder to act as an override and just code the display to meet the requirements.
You could also use a purely client-side approach via behaviors / JavaScript to target an element corresponding to the Admin Toolbar panel content and once that's been found, style to spec.
None of these approaches are that great but they're not horrible, either. I mean, it's better than just closing the issue with no suggestions.
Comment #4
wolf_22 commentedFor anyone seeing this (and until this module accommodates a better approach), it might be worth implementing a custom behavior for the admin toolbar along the following lines in an effort to better organize the panels this things generates in the admin/index screen:
1.) Create a custom module which provides a custom JavaScript (behaviors) file and a custom CSS file. Here's an idea of what to use for your libraries file:
admin.index:
2.) In the *.module file of your custom module, add a preprocess_page hook to attach to admin/index both your custom behavior and CSS files:
3.) Because the current Admin Toolbar lacks any real organization of the links it exposes, the quandary you'll want to solve is how the overall organization of its links is done when it also lacks labels for every link one might wish to have in order to better understand which links do which things (for example and with utility in mind, there are numerous "Add link" links, "Delete" links, etc. that you can only surmise the purpose of when hovering over their hyperlinks to see what their respective endpoints are at the bottom of the browser). So one possibility to fix this is to find all the "dt" element links and group them all into their respective utility group, such as a group for all the "Add link" links, all the "Delete" links, etc. HTML5 standards seem to make it sound as if dts can be contained in a dd container (but not vice-versa), so how you wish to solve all this boils down to your design preferences. I personally solved this by the grouping idea I suggested above by using the following behavior logic (it's not perfect but it's 100x better than what comes out of the can):
...which basically takes all the links in each panel found on the admin/index page and groups them into a corresponding container dd element that uses a heading that reflects the links' purposes. This sub-list is then expandable and contactable via an appended div.expand_toggle element found at the end of each group but this logic also allows for truncation / expansion of each panel as well (let me know if you need the styling for it).
Again, it's not perfect but after doing all this, I wound up with a nicely-organized admin/index screen with properly-spaced panels, all having a toggle effect for itself as well as any utility-groupings. It turned out well! :)
I hope this helps and if anyone needs any additional details or help with doing this, let me know. I'll help if I can.
Comment #5
tripodcreative commentedHere's an easier way to do this:
1). Copy admin-block.html.twig from core/modules/system/templates/admin-block.html.twig into your admin theme.
2). Add this twig:
will include the class name of the region, in this case, admintoolbarsearch
Then, in your admin theme, just
Comment #6
stefan.kornThe list that admin_toolbar_tools generate on admin/index is really cluttering the UI and the link titles are often confusing.
If you want to stop the output of admin_toolbar_tools before this actually is put on the site, you could use a Route Subscriber and override the core controller to exclude the links from admin_toolbar_tools.
Like so:
your_module.services.yml
src/Routing/RouteSubscriber.php
src/Controller/AdminController