Download & Extend

hook_menu doesn't mention 'expanded'

Project:Drupal core
Version:7.x-dev
Component:documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:needs backport to D7, Novice

Issue Summary

API page: http://api.drupal.org/api/drupal/modules%21system%21system.api.php/funct...

Enter a descriptive title (above) relating to hook_menu, then describe the problem you have found:

As mentioned in http://api.drupal.org/api/drupal/modules%21system%21system.api.php/funct..., this property is not mentioned in the docs. I can confirm it works on D7.

Comments

#1

What does this property do?

#2

If set, and if a menu link is provided for this menu item (as a result of other properties), then the menu link is always expanded, equivalently to its 'always expanded' checkbox being set in the UI.

#3

Issue tags:+Novice

OK, thanks! Sounds like a good Novice project to add this to the documentation.

#4

Status:active» needs review

First ever attempt at a patch, adding documentation for 'expanded' property in hook_menu.

AttachmentSizeStatusTest resultOperations
drupal-hook-menu-expanded-property-1851788-4.patch967 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-hook-menu-expanded-property-1851788-4.patch. Unable to apply patch. See the log in the details link for more information.View details

#5

Status:needs review» needs work

Thanks! The only thing is that "item" is misspelled as "tem" near the beginning of the second line. Looks like you figured out the patch process though, and other than that, I think the wording is good and it's ready to go in.

#6

Status:needs work» needs review

Correcting spelling error.

AttachmentSizeStatusTest resultOperations
drupal-hook-menu-expanded-property-1851788-6.patch968 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 49,305 pass(es).View details

#7

Status:needs review» reviewed & tested by the community

That version looks fine, thanks!

#8

Status:reviewed & tested by the community» fixed

Committed to 8.x. Thanks.

#9

Version:8.x-dev» 7.x-dev
Status:fixed» patch (to be ported)

#10

Assigned to:Anonymous» cck
Status:patch (to be ported)» needs review

7.x version patch ported from drupal-hook-menu-expanded-property-1851788-6.patch

AttachmentSizeStatusTest resultOperations
drupal-hook-menu-expanded-property-1851788-9.patch938 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 39,788 pass(es).View details

#11

Assigned to:cck» jhodgdon
Status:needs review» reviewed & tested by the community

Thanks! I'll get this committed shortly.

#12

#13

Assigned to:jhodgdon» Anonymous
Status:reviewed & tested by the community» fixed

Committed to 7.x. Thanks again!

#14

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.