i have a mini panel which takes a node as required context, named 'project'. within the panel i try to override a block title using '%project'. it doesn't work, which means that the keyword won't be replaced but outputted as is.

$mini = new stdClass;
$mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */
$mini->api_version = 1;
$mini->name = 'project_sidebar';
$mini->category = '';
$mini->title = 'Project sidebar';
$mini->requiredcontexts = array(
  '0' => array(
    'name' => 'node',
    'id' => 1,
    'identifier' => 'Project',
    'keyword' => 'project',
  ),
);
$mini->contexts = FALSE;
$mini->relationships = array(
  '0' => array(
    'context' => 'requiredcontext_node_1',
    'name' => 'term_from_node',
    'id' => 1,
    'identifier' => 'Project categories',
    'keyword' => 'project_categories',
    'relationship_settings' => array(
      'vid' => '3',
    ),
  ),
);
$display = new panels_display;
$display->layout = 'onecol';
$display->layout_settings = array();
$display->panel_settings = array();
$display->cache = array();
$display->title = '';
$display->content = array();
$display->panels = array();
  $pane = new stdClass;
  $pane->pid = 'new-1';
  $pane->panel = 'middle';
  $pane->type = 'views';
  $pane->subtype = 'pages';
  $pane->shown = TRUE;
  $pane->access = array();
  $pane->configuration = array(
    'override_pager_settings' => 0,
    'use_pager' => 0,
    'nodes_per_page' => '10',
    'pager_id' => '',
    'offset' => '0',
    'more_link' => 0,
    'feed_icons' => 0,
    'panel_args' => 0,
    'link_to_view' => 1,
    'args' => '',
    'url' => 'node',
    'display' => 'block_3',
    'context' => array(
      '0' => 'requiredcontext_node_1.nid',
    ),
    'override_title' => 1,
    'override_title_text' => '%project',
  );
  $pane->cache = array();
  $pane->style = array();
  $pane->css = array();
  $pane->extras = array();
  $pane->position = 0;
  $display->content['new-1'] = $pane;
  $display->panels['middle'][0] = 'new-1';
  $pane = new stdClass;
  $pane->pid = 'new-2';
  $pane->panel = 'middle';
  $pane->type = 'views';
  $pane->subtype = 'projects';
  $pane->shown = TRUE;
  $pane->access = array();
  $pane->configuration = array(
    'override_pager_settings' => 0,
    'use_pager' => 1,
    'nodes_per_page' => '3',
    'pager_id' => '',
    'offset' => '0',
    'more_link' => 0,
    'feed_icons' => 0,
    'panel_args' => 0,
    'link_to_view' => 0,
    'args' => '',
    'url' => '',
    'display' => 'block_link_1',
    'context' => array(
      '0' => '',
      '1' => '',
    ),
    'override_title' => 0,
    'override_title_text' => '',
  );
  $pane->cache = array();
  $pane->style = array();
  $pane->css = array();
  $pane->extras = array();
  $pane->position = 1;
  $display->content['new-2'] = $pane;
  $display->panels['middle'][1] = 'new-2';
$display->hide_title = PANELS_TITLE_FIXED;
$display->title_pane = '0';
$mini->display = $display;

Comments

jon pugh’s picture

Having the same issue. The problem with it outputting "%project" for you is that the new panels uses a new substitution format: %project:title

However, when you add a substitution using the new method: %node:title, it replaces it with an empty string.

merlinofchaos’s picture

Status: Active » Fixed

It seems the code for transmitting the context from the outer display into the mini panel was not properly copying the context. It worked, but it was retaining its original keyword, which isn't helpful. I checked a fix into CTools.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.