Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If the main page content is a views page, panels everywhere fails to render the contextual links.
views_page_alter() populates $page['#contextual_links'] but theme_panels_everywhere_page() does not render it.
A workaround is to alter the page in template.php
/**
* Implements hook_page_alter().
*/
function THEME_page_alter(&$page) {
// Panels everywhere fails to render page contextual links.
// Move them to $page['content'].
if ($page['#theme'] === 'panels_everywhere_page' && !empty($page['#contextual_links'])) {
$page['content']['#contextual_links'] = $page['#contextual_links'];
unset($page['#contextual_links']);
}
}
Comments