title: How to load a panel variant programmatically?
body: <p>I do load a panel (node_view) in a ct modal window. That works perfect so far. But now I need to load a specific variant of the panel.</p>
  
  <p>I was playing with the handler stuff... but didn't get, yet.</p>
  
  <p>How can I do this?</p>
  
  <p>Here's my code for loading the panel programmactically:</p>
  
  <pre><code>function get_panel_view(&amp;$node) {
      // Load my task plugin
      $task = page_manager_get_task('node_view');
  
      // Load the node into a context.
      ctools_include('context');
      ctools_include('context-task-handler');
  
      $contexts = ctools_context_handler_get_task_contexts($task, '', array($node));
  
      $output = ctools_context_handler_render($task, '', $contexts, array($node-&gt;nid));
      if ($output !== FALSE) {
         return $output;
         //return drupal_render($output['content']);
      }
      // Otherwise, fall back.
      return drupal_render(node_view(node_load($node-&gt;nid)));
  }
  </code></pre>