block_content.add.html.twig

Same filename in other branches
  1. 8.9.x core/modules/help_topics/help_topics/block_content.add.html.twig
  2. 10 core/modules/block_content/help_topics/block_content.add.html.twig
  3. 11.x core/modules/block_content/help_topics/block_content.add.html.twig
---
label: 'Creating a custom block'
related:
  - block.overview
  - block.configure
  - block.place
  - block_content.type
---
{% set library_link_text %}{% trans %}Custom block library{% endtrans %}{% endset %}
{% set library_link = render_var(help_route_link(library_link_text, 'entity.block_content.collection')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Create a custom block, which can later be placed on the site.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
  <li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Structure</em> &gt; <em>Block layout</em> &gt; {{ library_link }}.{% endtrans %}</li>
  <li>{% trans %}Click  <em>Add custom block</em>. If you have more than one custom block type defined on your site, click the name of the type you want to create.{% endtrans %}</li>
  <li>{% trans %}Enter a description of your block (to be shown to administrators) and the body text for your block.{% endtrans %}</li>
  <li>{% trans %}Click <em>Save</em>.{% endtrans %}</li>
</ol>

File

core/modules/help_topics/help_topics/block_content.add.html.twig

View source
  1. ---
  2. label: 'Creating a custom block'
  3. related:
  4. - block.overview
  5. - block.configure
  6. - block.place
  7. - block_content.type
  8. ---
  9. {% set library_link_text %}{% trans %}Custom block library{% endtrans %}{% endset %}
  10. {% set library_link = render_var(help_route_link(library_link_text, 'entity.block_content.collection')) %}
  11. <h2>{% trans %}Goal{% endtrans %}</h2>
  12. <p>{% trans %}Create a custom block, which can later be placed on the site.{% endtrans %}</p>
  13. <h2>{% trans %}Steps{% endtrans %}</h2>
  14. <ol>
  15. <li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Structure</em> &gt; <em>Block layout</em> &gt; {{ library_link }}.{% endtrans %}</li>
  16. <li>{% trans %}Click <em>Add custom block</em>. If you have more than one custom block type defined on your site, click the name of the type you want to create.{% endtrans %}</li>
  17. <li>{% trans %}Enter a description of your block (to be shown to administrators) and the body text for your block.{% endtrans %}</li>
  18. <li>{% trans %}Click <em>Save</em>.{% endtrans %}</li>
  19. </ol>

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