- πΊπΈUnited States darren oh Lakeland, Florida
This issue concerns code from a private fork of menu_field.
The issue:
Module developers are unable (at least not easily) to manually set an "active" path using code. This sort of functionality is similar to what's provided by menu_position (d7) or menutrails (d6), although each of those modules provides a UI to manage the configuration.
Technical description of the issue:
The menu_field_set_active_trail() function takes a $links array as its first argument. Without that array, the function does not get to the point where the "active" menu item/path is set. The array is built on the fly, and is not [static] cached. Therefore, in order for another module to manually set an active trail, it must also construct the $links array to pass into menu_field_set_active_trail().
A solution:
In order for other modules to be able to set the active trail, a new function should be created that [static] caches the $active_path argument, which is then called by menu_field_set_active_trail(). This allows those modules to initially set an $active_path variable without having to rebuild the entire $links array.
Closed: won't fix
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This issue concerns code from a private fork of menu_field.