Drupal 7 hook menu validating argument from url

05-Oct-2017 02:50

So your best bet would be to use Joachim's comment linked above.1.

Implement hook_menu_alter() to set a custom 'access callback' function on our views' page path /** * A custom 'access callback' function used by our view page display * to determine if its local task menu tab should show up or not.

*/ function my_module_node_content_custom_access_callback($options = array()) Thanks for stopping by and reading this article, I hope it helped bring a custom local task menu tab to your content type. I have not used it, howeer, as I could not figure out how to make this work for more tabs and different content types..

Please let me know of any alternative methods and/or contrib modules that would make this task easier! Then I found out, that views already does all this out of the box in advanced-Thanks Joachim!

What I did want however, was a contextual filter so the results could be limited to the current node.

Because the usual routing configuration is static in Drupal 8 (in YAML), this event was introduced to be able to create dynamic routes.