Custom content type: The title is not included within the styled content area

New Zeal - December 10, 2007 - 01:19
Project:Panels
Version:5.x-1.2
Component:Plugins - content types
Category:bug report
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Straight out of the box, Panels places the title for a pane outside the content area which is styled by the user inputted class and/or id. While the simplest solution is to not use a title and to place the title within the content textarea, it was more appropriate for my use to adjust the custom.php script so that it does go inside the styled content.

Modified code for custom.php:

function panels_content_custom($conf) {
  static $delta = 0;
  $block->module = 'custom';
  $block->delta = ++$delta;
  $block->content = theme('panels_custom_content', check_markup($conf['body'], $conf['title'], $conf['format'], FALSE), check_plain($conf['css_id']), check_plain($conf['css_class']) ,$conf['title']);
  return $block;
}

function theme_panels_custom_content($content, $id, $class, $title) {
  if ($id) {
    $id = 'id="' . $id . '"';
  }
  if ($content) {
    $output = '<div class="panels-custom ' . $class . '" ' . $id . '>';
    $output .= '<h2>'.$title.'</h2>';
    $output .= $content;
    $output .= '</div>';
  }
  return $output;
}

You will see that the title is passed from the first function to the second one, and placed between the divs. Also block->subject is no longer.

I am also currently dealing with two other problems here:
1. The filter setting is defaulting to the default setting and not the setting within the individual panes, so at present I am bypassing check_markup.
2. The wysiwyg editor is not working at all when I go to edit the content of a pane. I have tried both Tinymce and Whizzywig

Panels is a great facility and I hope that my comments are of some help.

#1

merlinofchaos - December 17, 2007 - 22:35
Status:active» won't fix

This doesn't happen like this in Panels 2, and I'm not making additional changes to Panels 1.2, so this is fixed/won't fix depending upon your version.

So far as I know, none of the WYSIWYG editors work within Panels and your best bet is to disable them on Panels admin pages to keep them from being a hindrance. They are quite cranky about the complicated forms.

 
 

Drupal is a registered trademark of Dries Buytaert.