menu_example.links.menu.yml

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