You are here

function panels_get_current_page_display in Panels 7.3

Same name and namespace in other branches
  1. 8.3 panels.module \panels_get_current_page_display()
  2. 6.3 panels.module \panels_get_current_page_display()

Get the display that is currently being rendered as a page.

Unlike in previous versions of this, this only returns the display, not the page itself, because there are a number of different ways to get to this point. It is hoped that the page data isn't needed at this point. If it turns out there is, we will do something else to get that functionality.

1 call to panels_get_current_page_display()
panels_panel_context_render in plugins/task_handlers/panel_context.inc
Check selection rules and, if passed, render the contexts.

File

./panels.module, line 1451
Core functionality for the Panels engine.

Code

function panels_get_current_page_display($change = NULL) {
  static $display = NULL;
  if ($change) {
    $display = $change;
  }
  return $display;
}