comment.disabling.html.twig

Same filename in other branches
  1. 9 core/modules/help_topics/help_topics/comment.disabling.html.twig
  2. 10 core/modules/comment/help_topics/comment.disabling.html.twig
---
label: 'Disabling comments'
related:
  - comment.overview
  - comment.configuring
---
{% set comment_permissions_text %}
{% trans %}Administer comments and comment settings{% endtrans %}
{% endset %}
{% set comment_permissions_link = render_var(help_route_link(comment_permissions_text, 'user.admin_permissions.module', {'modules': 'comment'})) %}
{% set comment_config_topic = render_var(help_topic_link('comment.configuring')) %}
{% set content_structure_topic = render_var(help_topic_link('core.content_structure')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Turn off commenting for a particular entity (see {{ content_structure_topic }} for more about content entities and fields). Note that if you want to turn off commenting for all entities of an entity type or subtype, you will need to edit the field settings for the comment field; see {{ comment_config_topic }} for more about configuring the comment field.{% endtrans %}</p>
<h2>{% trans %}Who can disable comments?{% endtrans %}</h2>
<p>{% trans %}You will need the <em>{{ comment_permissions_link }}</em> permission in order to disable commenting. You will also need permission to edit the entity that the comments are on.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
  <li>{% trans %}Find the entity you want to disable comments for, and edit it. For example, to turn off comments on a content item, you could find it by navigating in the <em>Manage</em> administrative menu to <em>Content</em>, filtering to find the content item, and clicking <em>Edit</em>.{% endtrans %}</li>
  <li>{% trans %}Under <em>Comment settings</em>, select the desired comment setting:{% endtrans %}
    <ul>
      <li>{% trans %}<em>Open</em>: comments are allowed.{% endtrans %}</li>
      <li>{% trans %}<em>Closed</em>: past comments remain visible, but no new comments are allowed.{% endtrans %}</li>
      <li>{% trans %}<em>Hidden</em>: past comments are hidden, and no new comments are allowed.{% endtrans %}</li>
    </ul>
  </li>
  <li>{% trans %}Save the entity.{% endtrans %}</li>
</ol>

File

core/modules/comment/help_topics/comment.disabling.html.twig

View source
  1. ---
  2. label: 'Disabling comments'
  3. related:
  4. - comment.overview
  5. - comment.configuring
  6. ---
  7. {% set comment_permissions_text %}
  8. {% trans %}Administer comments and comment settings{% endtrans %}
  9. {% endset %}
  10. {% set comment_permissions_link = render_var(help_route_link(comment_permissions_text, 'user.admin_permissions.module', {'modules': 'comment'})) %}
  11. {% set comment_config_topic = render_var(help_topic_link('comment.configuring')) %}
  12. {% set content_structure_topic = render_var(help_topic_link('core.content_structure')) %}
  13. <h2>{% trans %}Goal{% endtrans %}</h2>
  14. <p>{% trans %}Turn off commenting for a particular entity (see {{ content_structure_topic }} for more about content entities and fields). Note that if you want to turn off commenting for all entities of an entity type or subtype, you will need to edit the field settings for the comment field; see {{ comment_config_topic }} for more about configuring the comment field.{% endtrans %}</p>
  15. <h2>{% trans %}Who can disable comments?{% endtrans %}</h2>
  16. <p>{% trans %}You will need the <em>{{ comment_permissions_link }}</em> permission in order to disable commenting. You will also need permission to edit the entity that the comments are on.{% endtrans %}</p>
  17. <h2>{% trans %}Steps{% endtrans %}</h2>
  18. <ol>
  19. <li>{% trans %}Find the entity you want to disable comments for, and edit it. For example, to turn off comments on a content item, you could find it by navigating in the <em>Manage</em> administrative menu to <em>Content</em>, filtering to find the content item, and clicking <em>Edit</em>.{% endtrans %}</li>
  20. <li>{% trans %}Under <em>Comment settings</em>, select the desired comment setting:{% endtrans %}
  21. <ul>
  22. <li>{% trans %}<em>Open</em>: comments are allowed.{% endtrans %}</li>
  23. <li>{% trans %}<em>Closed</em>: past comments remain visible, but no new comments are allowed.{% endtrans %}</li>
  24. <li>{% trans %}<em>Hidden</em>: past comments are hidden, and no new comments are allowed.{% endtrans %}</li>
  25. </ul>
  26. </li>
  27. <li>{% trans %}Save the entity.{% endtrans %}</li>
  28. </ol>

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.