Add menu link to section library

Created on 24 March 2022, almost 3 years ago
Updated 8 June 2023, over 1 year ago

Problem/Motivation

Currently the section library can be accessed with a task link on /admin/content.

Also having a menu link would be better for admin UX.

✨ Feature request
Status

Needs review

Version

1.0

Component

User interface

Created by

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

    You could also copy paste the config from the install to your exported config file and reimport it. Make sure you didn't change anything on the view or you'll need to re-add those.

  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States jastraat

    I rebased this against 1.2.x and added a post update hook to update the view config for sites that already have section library installed.

  • πŸ‡ΊπŸ‡ΈUnited States jastraat

    Just merged ✨ Make section library template fieldable Active which defines an explicit menu item in the admin menu for the section library view which makes this approach outdated.

  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Hello,

    Sorry to re-open, but with ✨ Make section library template fieldable Active , there is no more tab on admin content view to go to the section library collection.

    Yes, there is now a menu link, but with Navigation module it is not displayed.

    So should we use this issue to provide a root level menu link for navigation "content" menu? Or create a dedicated one? Or not supported?

    I will create another issue to re-provide the tabs.

  • πŸ‡ΊπŸ‡ΈUnited States jastraat

    Yes, I did swap the tab for a menu item under content; that's what I understood this issue to be doing but I may have misunderstood. Could you clarify where you think the view makes sense?

  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Regarding other Core views, the behavior is not consistent:
    - content: the view provide the tab (as default menu tab), removing the tab in the view makes admin/content to still the the tab and fallback to the content entity type list builder, no more the view
    - blocks: the view provide the tab, but also code in block_content.links.task.yml
    - comments: the view provide the tab, but also code in comment.links.task.yml
    - files: the view provide the tab, but no additional code, removing the tab in the view remove the tab.
    - media: the view provide the tab, but also code in media.links.task.yml

    If the path is /admin/content/section-library, the tab from the view is not working. Because it fallbacks to the entity list collection route, no more the view. I guess that's why Core modules add the tab with code, and tab is removed for Files because file entity type does not have a collection route declared in the entity annotation.

    So I would say, let's remove the tab from the view as it has no effect, use code in links.task.yml.

    And for admin menu link, let's also use code.

    Also when saving the section library view I have this PHP error:

    Deprecated function: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Core\Config\Entity\Query\Condition->compile() (line 39 of core/lib/Drupal/Core/Config/Entity/Query/Condition.php).

  • πŸ‡ΊπŸ‡ΈUnited States jastraat

    Given the work being done in ✨ Restore the tab to section library collection Active , perhaps we should close this ticket in favor of that one?

  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Agreed to close this issue.

Production build 0.71.5 2024