Skip to content

Instantly share code, notes, and snippets.

@nicksantamaria
Created September 20, 2011 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicksantamaria/1228371 to your computer and use it in GitHub Desktop.
Save nicksantamaria/1228371 to your computer and use it in GitHub Desktop.
Function to render custom panel panes.
<?php
/**
* Render a Ctools custom content pane.
*
* Mostly useful for when you need to render custom content panes
* outside of panels.
*
* @param $id
* Custom content pane machine name.
* @return
* Rendered custom content pane
*/
function nsla_ui_render_custom_content_pane($id) {
ctools_include('content');
$content = ctools_content_render('custom', $id, array('name' => $id));
return (empty($content)) ? FALSE : theme('panels_pane', array('content' => $content, 'pane' => NULL, 'display' => NULL));
}
@cravecode
Copy link

very helpful, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment