Is it possible to create a panalized node in code? Perhaps something like


$node = new stdClass;
// ... Set other properties
node_save($node)

// Then somehow add panalizer , layout, panels 
// Something like:
$panelizer = array ( 'nid' => $node->nid ...')

//save it
panelizer_save_node_panelizer($panelizer) // not sure if this is the correct function

// add existing panels/panes to the node 


Comments

awm’s picture

Anyone?

damienmckenna’s picture

Issue summary: View changes
Status: Active » Fixed

Load the Panelizer display for a given node and display it using Devel module:

  ctools_include('node', 'panelizer');
  $panelizer = panelizer_load_node_panelizer($node);
  kpr($panelizer);

Use that to identify how the object should be structured. Then save your own via:
panelizer_save_node_panelizer($panelizer);

Status: Fixed » Closed (fixed)

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