diff --git a/metatag_panels/metatag_panels.module b/metatag_panels/metatag_panels.module index 016f715..640a1ad 100644 --- a/metatag_panels/metatag_panels.module +++ b/metatag_panels/metatag_panels.module @@ -117,6 +117,13 @@ function metatag_panels_ctools_render_alter($info, $page, $context) { $tokens[$task_context->keyword] = $task_context->data; } + // Because of page execution order, sometimes the page title does not get set + // by Panels in time for metatags to use it, so we'll explicitly set it here + // if we need to. + if (!empty($info['title'])) { + drupal_set_title($info['title']); + } + // Build the Metatag. $options = array( 'instance' => 'panels:' . $handler->name,