Sometimes I need to display user tabs sitewide, but they are path-dependent (user/*)
This can be archieved by altering $_GET['q'] value, while getting menu_local_tasks();
I've made a small patch, to provide "local_tasks_blocks_fixed_path" setting with token support (using user/[current-user:uid] for example above)
This can be handy for some situations

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

player259’s picture

FileSize
1.87 KB
jay.dansand’s picture

Assigned: Unassigned » jay.dansand
Status: Active » Needs work

I like it! Here are some quick notes before it can be a candidate patch to merge in:

  1. There needs to be some better #description in the form for describing what setting the fixed path means and does.
  2. There are some Drupal coding standards changes that need to be made, for example there shouldn't be any 1-line IF statements.
  3. Moving the token_replace() check/call inside of the check for !empty($fixed_path) (also: using !empty() instead of just testing "if ($fixed_path)".)