首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用注释包装器-<content- type >.tpl.php在drupal 7中更改特定节点类型的注释头

如何使用注释包装器-<content- type >.tpl.php在drupal 7中更改特定节点类型的注释头
EN

Stack Overflow用户
提问于 2017-02-08 09:04:36
回答 1查看 229关注 0票数 0

嗨,我是Drupal发展公司的新手。我试图改变文章内容的评论部分。我的要求是要将评论科中的标题从添加新注释改为添加新评论注释以前的评论,并将subjectE 210更改为E 111评审主题E 212使用bartik作为基本主题。

有人能帮我吗。下面是我在子theme.But中修改的注释包装器文章.tpl.php中的代码,我无法更改显示。

代码语言:javascript
复制
<?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; ?>
?>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-13 05:01:16

最后,我成功地获得了问题的解决方案,以防任何人面临相同的problem.Here是解决方案。

代码语言:javascript
复制
<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“中

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42108749

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档