comment.creating_type.html.twig

Same filename and directory in other branches
  1. 10 core/modules/comment/help_topics/comment.creating_type.html.twig
  2. 11.x core/modules/comment/help_topics/comment.creating_type.html.twig
---
label: 'Creating a comment type'
related:
  - field_ui.add_field
  - field_ui.manage_display
  - field_ui.manage_form
  - comment.overview
  - comment.configuring
---
{% set comment_types_link_text %}
  {% trans %}Comment types{% endtrans %}
{% endset %}
{% set comment_types_link = render_var(help_route_link(comment_types_link_text, 'entity.comment_type.collection')) %}
{% set comment_permissions_link_text %}
  {% trans %}Administer comment types and settings{% endtrans %}
{% endset %}
{% set comment_permissions_link = render_var(help_route_link(comment_permissions_link_text, 'user.admin_permissions.module', {'modules': 'comment'})) %}
{% set comment_overview_topic = render_var(help_topic_link('comment.overview')) %}
{% set content_structure_topic = render_var(help_topic_link('core.content_structure')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Create a new comment type. See {{ comment_overview_topic }} for information about comments and comment types.{% endtrans %}</p>
<h2>{% trans %}Who can create a comment type?{% endtrans %}</h2>
<p>{% trans %}Users with the <em>{{ comment_permissions_link }}</em> permission (typically administrators) can create comment types.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
  <li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Structure</em> &gt; <em>{{ comment_types_link }}</em>.{% endtrans %}</li>
  <li>{% trans %}Click <em>Add comment type</em>.{% endtrans %}</li>
  <li>{% trans %}In the <em>Label</em> field, enter a name for the comment type, which is how it will be listed in the administrative interface.{% endtrans %}</li>
  <li>{% trans %}In the <em>Target entity type</em> field, select the entity type to be commented on. See {{ content_structure_topic }} for more about content entities and fields.{% endtrans %}</li>
  <li>{% trans %}Click <em>Save</em>. The comment type will be created.{% endtrans %}</li>
  <li>{% trans %}Optionally, if you have the core Field UI module installed you can follow the steps in the related topics to add fields to the new comment type, set up the editing form, and configure the display.{% endtrans %}</li>
</ol>

File

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

View source
  1. ---
  2. label: 'Creating a comment type'
  3. related:
  4. - field_ui.add_field
  5. - field_ui.manage_display
  6. - field_ui.manage_form
  7. - comment.overview
  8. - comment.configuring
  9. ---
  10. {% set comment_types_link_text %}
  11. {% trans %}Comment types{% endtrans %}
  12. {% endset %}
  13. {% set comment_types_link = render_var(help_route_link(comment_types_link_text, 'entity.comment_type.collection')) %}
  14. {% set comment_permissions_link_text %}
  15. {% trans %}Administer comment types and settings{% endtrans %}
  16. {% endset %}
  17. {% set comment_permissions_link = render_var(help_route_link(comment_permissions_link_text, 'user.admin_permissions.module', {'modules': 'comment'})) %}
  18. {% set comment_overview_topic = render_var(help_topic_link('comment.overview')) %}
  19. {% set content_structure_topic = render_var(help_topic_link('core.content_structure')) %}
  20. <h2>{% trans %}Goal{% endtrans %}</h2>
  21. <p>{% trans %}Create a new comment type. See {{ comment_overview_topic }} for information about comments and comment types.{% endtrans %}</p>
  22. <h2>{% trans %}Who can create a comment type?{% endtrans %}</h2>
  23. <p>{% trans %}Users with the <em>{{ comment_permissions_link }}</em> permission (typically administrators) can create comment types.{% endtrans %}</p>
  24. <h2>{% trans %}Steps{% endtrans %}</h2>
  25. <ol>
  26. <li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Structure</em> &gt; <em>{{ comment_types_link }}</em>.{% endtrans %}</li>
  27. <li>{% trans %}Click <em>Add comment type</em>.{% endtrans %}</li>
  28. <li>{% trans %}In the <em>Label</em> field, enter a name for the comment type, which is how it will be listed in the administrative interface.{% endtrans %}</li>
  29. <li>{% trans %}In the <em>Target entity type</em> field, select the entity type to be commented on. See {{ content_structure_topic }} for more about content entities and fields.{% endtrans %}</li>
  30. <li>{% trans %}Click <em>Save</em>. The comment type will be created.{% endtrans %}</li>
  31. <li>{% trans %}Optionally, if you have the core Field UI module installed you can follow the steps in the related topics to add fields to the new comment type, set up the editing form, and configure the display.{% endtrans %}</li>
  32. </ol>

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