You are here

function panels_node_edit_content in Panels 5.2

Same name and namespace in other branches
  1. 6.3 panels_node/panels_node.module \panels_node_edit_content()
  2. 6.2 panels_node/panels_node.module \panels_node_edit_content()
  3. 7.3 panels_node/panels_node.module \panels_node_edit_content()

Pass through to the panels content editor.

1 string reference to 'panels_node_edit_content'
panels_node_menu in panels_node/panels_node.module
Implementation of hook_menu().

File

panels_node/panels_node.module, line 375
panels_node.module

Code

function panels_node_edit_content($node) {
  panels_load_include('plugins');
  $display = panels_load_display($node->panels_node['did']);
  $display->context = array(
    'panel-node' => panels_context_create('node', $node),
  );
  $display->context['panel-node']->identifier = $node->title;

  // Load additional contexts.
  $panel_node = (object) $node->panels_node;
  $display->context += panels_context_load_contexts($panel_node);
  panels_load_include('common');
  $content_types = panels_common_get_allowed_types('panels_node', $display->context);

  // Print this with theme('page') so that blocks are disabled while editing a display.
  // This is important because negative margins in common block layouts (i.e, Garland)
  // messes up the drag & drop.
  print theme('page', panels_edit($display, "node/{$node->nid}/panel_content", $content_types), FALSE);
}