如何使用 comment-wrapper-<content-type>.tpl.php 更改 drupal 7 子主题中特定节点类型的评论 header

how to change comment header in particular node type in sub theme in drupal 7 using comment-wrapper-<content-type>.tpl.php

您好,我是 Drupal 开发的新手。 我正在尝试更改文章内容的评论部分。 我的要求是我想将 [评论部分] 1 中的 header 从 添加新评论 更改为 添加新评论评论 以前的评论主题 评论主题 在我的子主题中使用 bartik 作为基本主题。

谁能帮帮我。 这是我在子 comment-wrapper-article.tpl.php 中更改的代码 theme.But 我无法更改显示。

<?php
<div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>
<?php if ($node->type == 'article'): && $node->type == 'article');?>
<?php print render($title_prefix); ?>
<h2 class="title"><?php print t('previous Reviews'); ?></h2>
<?php print render($title_suffix); ?>
<?php endif; ?>
<?php print render($content['comments']  ?>
<?php if ($content['comment_form']): ?>
<h2 class="title comment-form"><?php print t('Add New Review'); ?></h2>
<?php print render($content['comment_form']); ?>
<?php endif; ?>
?>

最后我成功地找到了问题的解决方案,以防万一有人遇到相同的问题problem.Here就是解决方案。

<div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>
<?php if ($content['comments'] && $node->type != 'forum'): ?>
<?php print render($title_prefix); ?>
<h2 class="title"><?php print t('Previous Reviews'); ?></h2>
<?php print render($title_suffix); ?>
<?php endif; ?>
<?php print render($content['comments']); ?>
<?php if ($content['comment_form']): ?>
<h2 class="title comment-form"><?php print t('Add New Review'); ?></h2>
<?php print render($content['comment_form']); ?>
<?php endif; ?>
</div>

主要要求是文件名应采用以下格式。"comment-wrapper--node-contenttype.tpl.php"