Created
September 20, 2011 05:04
-
-
Save nicksantamaria/1228371 to your computer and use it in GitHub Desktop.
Function to render custom panel panes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
very helpful, thanks!