https://github.com/paboden/system_menu_example
An example on how to create a system menu (non-delete-able) and menu links to external sites in a module.
https://github.com/paboden/system_menu_example
drupal-7 drupal-7-module
Last synced: 5 months ago
JSON representation
An example on how to create a system menu (non-delete-able) and menu links to external sites in a module.
- Host: GitHub
- URL: https://github.com/paboden/system_menu_example
- Owner: paboden
- Created: 2016-02-20T03:57:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-08-10T02:08:49.000Z (11 months ago)
- Last Synced: 2025-08-10T04:09:44.813Z (11 months ago)
- Topics: drupal-7, drupal-7-module
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**Drupal 7**
# System menu example module
## Create your own menu in code
An example on how to create a system menu (non-delete-able menu) and examples of menu links to external sites, callback links to external sites, changing internal URL's to external URL's and examples of duplicating existing links in a new menu (like logout) completely from within a module.
This is an **EXAMPLE** only module. On its own, its not useful, but can be used as a framework for creating your own hardcoded Drupal menu.
## Why...wha...huh?
_So, What is this setup good for?_
The real power for this setup is if you want to be able to control a menu in code that has many external URL's or duplicate links (like logout or login) and you don't want to have to manually enter the menu items through the UI.
This can be helpful in a multi-site setup where the menu is the same across all sites, and any changes to it you want to be able to immediately set up across all sites.