Comments
Comment #2
merlinofchaos commented| Status: | Active | » Fixed |
Panels does not pass the comment data through comment-wrapper.tpl.php in favor of using the pane system. If you just need to add the 'comments' id, edit the CSS properties of the pane and add comments. Otherwise you can probably also override theme_panel_pane() for the pane to change the output a little.
Comment #5
merlinofchaos commented| Priority: | Critical | » Normal |
| Status: | Active | » Closed (works as designed) |
Sorry, if you really need the comment-wrapper you'll need to create a custom content type or theme panels-pane as suggested. It does not work well with panes by default and would cause problems, which is why I elected to skip it.
Comment #6
fuerst commentedSince the node_comments pane is empty you can not use theme_panels_pane() when you want to theme the empty node_comments pane too.
I instead used theme_panels_default_style_render_panel() to inject some empty HTML code:
/**
* Panels default style modifizieren
*
* @return void
* @author Bernhard Fürst
*/
function YOURTHEME_panels_default_style_render_panel($display, $panel_id, $panes, $settings) {
foreach ($panes as $pane) {
if ('node_comments' == $pane->type && '' == $pane->content) {
$pane->content = '<div class="empty"><p>No comments so far.</p></div>';
}
}
return theme_panels_default_style_render_panel($display, $panel_id, $panes, $settings);
}
I think this is not optimal but I don't know any other way besides creating my own node_comments plugin for ctools. What do you think?
BTW: I did not find any documentation for theme_panels_pane() in Panels 3. In the end I tried http://api.lullabot.com/theme_panels_pane/5 and it worked. What is the status of this function in Panels 3?
Comment #7
Anonymous (not verified) commentedHas there been any progress on this issue over the past few years, losing the comment.tpl.php when panels is selected for managing comment display is frustrating.
Comment #8
Anonymous (not verified) commentedJust an fyi for anyone who finds this thread. You can use Display Suite to format the display of your comments and still have access to comment.tpl.php.
Why is this? Should not the comment-wrapper.tpl.php hook all comment related stuff?