This Themer's Path to a Pane

A Themer's Solution....
I have in my theme a directory called plugins. in there I have layouts and styles in styles I have a folder called thintop and... in there I have 2 files (tho I have commented out the template file in favor of this fancy rendering which gives me admin links and extra stuff in my pane... thintop.inc and THEME-NAME-thintop.tpl.php (based on http://drupal.org/node/495654) good info at http://drupal.org/node/427192
The .inc looks like this
Panels hooks.
/** * Implementation of hook_panels_style_info(). */
function THEME_NAME_thintop_panels_styles() { return array( 'thintop' => array( 'title' => t('Thin Top'), 'description' => t('Thin Top'), 'render panel' => 'THEME_NAME_thintop_style_render_panel', 'render pane' => 'THEME_NAME_thintop_style_render_pane', 'settings form' => 'THEME_NAME_thintop_style_settings_form', 'hook theme' => array( 'THEME_NAME_thintop_box' => array( 'arguments' => array('content' => NULL), 'path' => panels_get_path('plugins/styles/thintop'), 'template' => 'genesis-aii-thintop-box', ), ), ), ); }
Panels style plugin callbacks.
function theme_THEME_NAME_thintop_style_render_pane($content, $pane, $display) { if (!empty($content->content)) { $idstr = $classstr = ''; if (!empty($content->css_id)) { $idstr = ' id="' . $content->css_id . '"'; } if (!empty($content->css_class)) { $classstr = ' ' . $content->css_class; } $output = "
" . theme('links', $content->admin_links) . "\n"; } if (!empty($content->title)) { // !Changed H2 tag to an H1 tag $output .= "
$content->title
\n"; } if (!empty($content->feeds)) { $output .= "
" . implode(' ', $content->feeds) . "\n"; } $output .= "
$content->content\n"; if (!empty($content->links)) { $output .= "
" . theme('links', $content->links) . "\n"; } if (!empty($content->more)) { if (empty($content->more['title'])) { $content->more['title'] = t('more'); } $output .= "
" . l($content->more['title'], $content->more['href']) . "\n"; } $output .= "\n"; return $output; } }
when I was using a template the $output was $output .= '
'; $output .= $content->title; $output .= '
'; $output .= $content->content; $output = theme('THEME_NAME_thintop_box', $output); return $output;
and the tpl.php is pretty basic
IMPORTANT!!!
Add to your .info file in your theme!!;----------// Plugin Panels plugins[panels][layouts] = plugins/layouts plugins[panels][styles] = plugins/styles
remember to clear the theme registry... or you'll probably get nothin'
