Custom module in drupal 8, tab not created in admin section -
i created custom module in drupal 8. module should create tab in admin/content. unfortunately tab not display in admin/content section. while can able access module. link access module 'localhost/demo/admin/content/book'
here code:- book.routing.yml
# book.routing.yml snippet book.admin: path: '/admin/content/book' defaults: _form: '\drupal\book\form\bookform' _title: 'books' requirements: _permission: 'book access'
book.links.menu.yml
# book.links.menu.yml snippet book.admin: route_name: book.admin title: books base_route: system.admin_content
for more information attaching screenshot, want tab
expecting 1
you should rename file
book.links.task.yml
because want "task" of content instead of real menu link. here's great explanation , guide how create custom modules:
http://www.sitepoint.com/build-drupal-8-module-routing-controllers-menu-links/
note of file namings outdated (e.g. "menu_links"), general idea/structure of module still explained.
Comments
Post a Comment