Coming from #1043906: Document how to possible to add link options when defining local tasks and actions, reported by r_honey and confirmed/discussed by several others...

Problem/Motivation

In hook_menu(), you can add an 'options' element to your menu item arrays. It is documented to be used to add attributes to the generated menu links. However, the options are not currently applied when tabs are generated (MENU_LOCAL_TASK/MENU_LOCAL_ACTION).

Proposed resolution

#1043906: Document how to possible to add link options when defining local tasks and actions is asking for this behavior to be changed (to make options work with tabs).
This issue is asking for the current behavior, in the meantime, to be documented.

Remaining tasks

Update the hook_menu() documentation so it is accurate.

User interface changes

None.

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Tagging... I think that since the behavior has been tested by several people over on #1043906: Document how to possible to add link options when defining local tasks and actions, it's probably a good Novice project to fix the documentation?

mkadin’s picture

Status: Active » Needs review
FileSize
836 bytes
jhodgdon’s picture

Status: Needs review » Needs work

Thanks! The wording in the patch is fine. There is an extra space at the end of one of the lines though.

mkadin’s picture

Status: Needs work » Needs review
FileSize
1.85 KB

Fixed!

Status: Needs review » Needs work

The last submitted patch, patch_hook_menu_options_docs_4.patch, failed testing.

jhodgdon’s picture

That patch has some extra stuff in it...

mkadin’s picture

Status: Needs work » Needs review
FileSize
835 bytes

Whoops. Here we go.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thanks!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Nice. Committed to 7.x and 8.x.

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