menu_example.links.menu.yml

Same filename in other branches
  1. 3.x modules/menu_example/menu_example.links.menu.yml
  2. 8.x-1.x menu_example/menu_example.links.menu.yml
modules/menu_example/menu_example.links.menu.yml

File

modules/menu_example/menu_example.links.menu.yml

View source
  1. # This file links a menu link with route_name.
  2. #
  3. # 'title' is the only required key.
  4. # 'description' is shown either as a tooltip on the item or as the description
  5. # of the option on the page in the admin UI.
  6. # 'weight' is used to order the items. (Higher weights get placed towards the
  7. # end of the menu among items on the same level.)
  8. # 'route_name' is used to associate menu links to the corresponding route.
  9. # 'parent' is used to put items into the menu hierarchy by referring to the
  10. # parent menu link name.
  11. #
  12. examples.menu_example:
  13. title: 'Menu Example'
  14. description: 'Simplest possible menu type, and the parent menu entry for others'
  15. expanded: 1
  16. route_name: examples.menu_example
  17. examples.menu_example.alternate_menu:
  18. title: 'Menu Example: Menu in alternate menu'
  19. # If menu_name is omitted, the "Tools" menu will be used.
  20. menu_name: 'main'
  21. route_name: examples.menu_example.alternate_menu
  22. examples.menu_example.restricted:
  23. title: 'Restricted Example'
  24. parent: examples.menu_example
  25. expanded: 1
  26. route_name: examples.menu_example.restricted
  27. weight: 10
  28. examples.menu_example.restricted_controlled:
  29. title: 'Restricted Menu Item'
  30. parent: examples.menu_example.restricted
  31. route_name: examples.menu_example.restricted_controlled
  32. weight: 10
  33. examples.menu_example.custom_access:
  34. title: 'Custom Access Example'
  35. parent: examples.menu_example
  36. expanded: 1
  37. route_name: examples.menu_example.custom_access
  38. weight: -5
  39. examples.menu_example.custom_access_page:
  40. title: 'Custom Access Menu Item'
  41. parent: examples.menu_example.custom_access
  42. route_name: examples.menu_example.custom_access_page
  43. examples.menu_example.route_only:
  44. title: 'Route only example'
  45. parent: examples.menu_example
  46. route_name: examples.menu_example.route_only
  47. weight: 20
  48. examples.menu_example.tabs:
  49. title: 'Tabs'
  50. description: 'Shows how to create primary and secondary tabs'
  51. parent: examples.menu_example
  52. route_name: examples.menu_example.tabs
  53. weight: 30
  54. examples.menu_example.use_url_arguments:
  55. title: 'URL Arguments'
  56. description: 'The page callback can use the arguments provided after the path used as key'
  57. parent: examples.menu_example
  58. route_name: examples.menu_example.use_url_arguments
  59. weight: 40
  60. examples.menu_example.title_callbacks:
  61. title: 'Dynamic title'
  62. description: 'The title of this menu item is dynamically generated'
  63. parent: examples.menu_example
  64. route_name: examples.menu_example.title_callbacks
  65. weight: 50
  66. examples.menu_example.placeholder_argument:
  67. title: Placeholder Arguments
  68. description: ''
  69. parent: 'examples.menu_example'
  70. route_name: examples.menu_example.placeholder_argument
  71. weight: 60
  72. example.menu_example.path_override:
  73. title: Path Override
  74. description: ''
  75. parent: 'examples.menu_example'
  76. route_name: example.menu_example.path_override
  77. weight: 70