Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298950

Separate Action Links from hook_menu()

$
0
0

Spinoff from #1889790: Allow modules to register links for menus, breadcrumbs and tabs (if not with hook_menu):

We rip action links out of hook_menu entirely, using essentially the model from #1889790-9: Allow modules to register links for menus, breadcrumbs and tabs (if not with hook_menu). To wit, action links become their own object unto themselves that reference to a route they point TO, and to routes they should appear ON. They are then removed from hook_menu entirely. We then build a block that looks at the current route (which may need to be passed as a literal string, not pulled from the request, TBD), grabs the action links that should be on that route, and displays them. Want to change the L&F? It's a block. Enjoy.

Benefit: Action links get separated from hook_menu, where they didn't belong in the first place.


Viewing all articles
Browse latest Browse all 298950

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>