0
ct 모달 창에서 패널 (node_view)을로드합니다. 지금까지 완벽하게 작동합니다. 하지만 지금은 패널의 특정 변형을로드해야합니다.프로그래밍 방식으로 패널 변형을로드하는 방법은 무엇입니까?
나는 핸들러를 가지고 놀고 있었지만 아직 얻지 못했습니다.
어떻게하면됩니까?
여기 programmactically 패널을로드하는 내 코드입니다 :
function get_panel_view(&$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->nid));
if ($output !== FALSE) {
return $output;
//return drupal_render($output['content']);
}
// Otherwise, fall back.
return drupal_render(node_view(node_load($node->nid)));
}