I'm having basically the exact problem expressed here: #1921886: drupal_get_title() doesn't get pane title (except I'm seeing this in recent dev versions of Panels and ctools for D7).
I'm trying to call drupal_get_title() in my theme's theme_breadcrumb() implementation but the page title hasn't yet been set by Panels (ctools) at that point.
I followed Merlin's advice in that thread to use ctools_set_variable_token('title') but that isn't working for me either, nor do I suspect it'll ever work since it appears ctools_page_token_processing() is attempting to pull the replacement values from a $variables array that never gets set. I'd submit a patch but it's unclear to me how those variables are intended to get injected into ctools_page_token_processing().
Alternatively, I'd welcome an idea on how to get ctools' page title plugin to set the title sooner.
Comments
Comment #1
azinck commentedI'd be super-grateful for any pointers here on the best way to approach this.
Comment #2
azinck commentedOk, I've had a little more chance to look into this. It appears it was this commit that essentially broke this functionality.
See my comment here: #955070-4: Update the token replacements in ctools to work against a fully rendered page.