block_content.add.html.twig

Same filename in other branches
  1. 9 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 content_url = render_var(url('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; <a href="{{ content_url }}"><em>Custom block library</em></a>.{% 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 content_url = render_var(url('entity.block_content.collection')) %}
  10. <h2>{% trans %}Goal{% endtrans %}</h2>
  11. <p>{% trans %}Create a custom block, which can later be placed on the site.{% endtrans %}</p>
  12. <h2>{% trans %}Steps{% endtrans %}</h2>
  13. <ol>
  14. <li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Structure</em> &gt; <em>Block layout</em> &gt; <a href="{{ content_url }}"><em>Custom block library</em></a>.{% endtrans %}</li>
  15. <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>
  16. <li>{% trans %}Enter a description of your block (to be shown to administrators) and the body text for your block.{% endtrans %}</li>
  17. <li>{% trans %}Click <em>Save</em>.{% endtrans %}</li>
  18. </ol>

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