You are here

function panels_nid_choose_display in Panels 6.2

Same name and namespace in other branches
  1. 5.2 arguments/nid.inc \panels_nid_choose_display()

Based upon the settings and the context, choose which display to use.

1 string reference to 'panels_nid_choose_display'
panels_nid_panels_arguments in arguments/nid.inc
@file arguments/nid.inc

File

arguments/nid.inc, line 149
arguments/nid.inc

Code

function panels_nid_choose_display($conf, $context) {
  if (empty($context->data)) {
    return;
  }
  if (!empty($conf['displays'][$context->data->type])) {
    return $context->data->type;
  }

  // Please note that 'default' is a special display.
  if (!empty($conf['own_default'])) {
    return 'default';
  }

  // Empty return says to use the default display.
  return;
}