What is the difference between MENU_NORMAL_ITEM and MENU_CALLBACK?
The more precise answer is that hook_menu()
creates router items, and also menu links are generated. MENU_NORMAL_ITEM
generates a menu link which will appear in the navigation menu, while MENU_CALLBACK
does not add a menu link, so it won't appear in the menu.
Addition to the above comment, MENU_CALLBACK can be used in some scenarios such as AJAX. Example: example.com/ajax/country_list is a MENU_CALLBACK which returns a list of countries in HTML,JSON or XML format... This menu doesn't appear in the browser. You can visit http://api.drupal.org/api/group/menu/6 for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With