I need to be able to override the block titles for the local tasks blocks dynamically based on the context. It's a shame that there is no way to do this in core.
If anyone knows of a way to do this, please let me know.
Since I know of no other way, I am working on a patch that provides theme functions for each block provided by local_tasks_blocks. The theme functions will be responsible for returning the block view array (title & content) and will be passed the default title and the tasks provided by menu_primary_local_tasks() and menu_secondary_local_tasks() accordingly.
This will provide me and others the ability to override the block title dynamically on a per block basic.
(I marked this as a support request as there may be a way to do this already, will change it to a feature request when I submit the patch)
Comments
Comment #1
lee20 commentedAh I found that I can override the block title using a tpl file. Issue solved!
Comment #2
lee20 commentedI found an even more preferable way to do this using preprocess_block hook.