嗨,我是Drupal发展公司的新手。我试图改变文章内容的评论部分。我的要求是要将评论科中的标题从添加新注释改为添加新评论和注释到以前的评论,并将subjectE 210更改为E 111评审主题E 212使用bartik作为基本主题。
有人能帮我吗。下面是我在子theme.But中修改的注释包装器文章.tpl.php中的代码,我无法更改显示。
<?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; ?>
?>发布于 2017-02-13 05:01:16
最后,我成功地获得了问题的解决方案,以防任何人面临相同的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>主要要求是文件名应该在以下format."comment-wrapper--node-contenttype.tpl.php“中
https://stackoverflow.com/questions/42108749
复制相似问题