menu_ui.menu_item_add.html.twig

Same filename in other branches
  1. 10 core/modules/menu_ui/help_topics/menu_ui.menu_item_add.html.twig
  2. 11.x core/modules/menu_ui/help_topics/menu_ui.menu_item_add.html.twig
---
label: Adding a link to a menu
related:
  - menu_ui.content_type_configuration
  - menu_ui.menu_operations
  - core.menus
---
{% set structure_menu_text %}{% trans %}Menus{% endtrans %}{% endset %}
{% set structure_menu_link = render_var(help_route_link(structure_menu_text, 'entity.menu.collection')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Add a link to a menu. Note that you can also add a link to a menu from the content edit page if menu settings have been configured for the content type.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
  <li>{% trans %}In the <em>Manage</em> administration menu, navigate to <em>Structure</em> &gt; {{ structure_menu_link }}.{% endtrans %}</li>
  <li>{% trans %}Locate the desired menu and click <em>Add link</em> in the <em>Operations</em> list.{% endtrans %}</li>
  <li>{% trans %}Enter the <em>Menu link title</em> to be displayed.{% endtrans %}</li>
  <li>{% trans %}Enter the <em>Link</em>, one of the following:{% endtrans %}
    <ul>
      <li>{% trans %}An internal path, such as <em>/node/add</em>{% endtrans %}</li>
      <li>{% trans %}A full external URL{% endtrans %}</li>
      <li>{% trans %}Start typing the title of a content item and select it when the full title comes up{% endtrans %}</li>
      <li>{% trans %}<em>&lt;nolink&gt;</em> to display the <em>Menu link title</em> as plain text without a link{% endtrans %}</li>
      <li>{% trans %}<em>&lt;front&gt;</em> to link to the front page of your site{% endtrans %}</li>
    </ul>
  </li>
  <li>{% trans %}Make sure that <em>Enabled</em> is checked; if not, the menu link will not be displayed.{% endtrans %}</li>
  <li>{% trans %}Optionally, enter a <em>Description</em>, which will be displayed when a user hovers over the link.{% endtrans %}</li>
  <li>{% trans %}Optionally, check <em>Show as expanded</em> to automatically show the children of this link (if any) when this link is shown.{% endtrans %}</li>
  <li>{% trans %}Optionally, select the <em>Parent link</em>, if this menu link should be a child of another menu link.{% endtrans %}</li>
  <li>{% trans %}Click <em>Save</em>. You will be returned to the <em>Add link</em> page to add another link.{% endtrans %}</li>
  <li>{% trans %}In the <em>Manage</em> administration menu, navigate to <em>Structure</em> &gt; {{ structure_menu_link }}.{% endtrans %}</li>
  <li>{% trans %}Locate the menu you just added a link to and click <em>Edit</em> in the <em>Operations</em> list.{% endtrans %}</li>
  <li>{% trans %}Verify that the order of links is correct. If it is not, drag menu links until the order is correct, and click <em>Save</em>.{% endtrans %}</li>
</ol>

File

core/modules/help_topics/help_topics/menu_ui.menu_item_add.html.twig

View source
  1. ---
  2. label: Adding a link to a menu
  3. related:
  4. - menu_ui.content_type_configuration
  5. - menu_ui.menu_operations
  6. - core.menus
  7. ---
  8. {% set structure_menu_text %}{% trans %}Menus{% endtrans %}{% endset %}
  9. {% set structure_menu_link = render_var(help_route_link(structure_menu_text, 'entity.menu.collection')) %}
  10. <h2>{% trans %}Goal{% endtrans %}</h2>
  11. <p>{% trans %}Add a link to a menu. Note that you can also add a link to a menu from the content edit page if menu settings have been configured for the content type.{% endtrans %}</p>
  12. <h2>{% trans %}Steps{% endtrans %}</h2>
  13. <ol>
  14. <li>{% trans %}In the <em>Manage</em> administration menu, navigate to <em>Structure</em> &gt; {{ structure_menu_link }}.{% endtrans %}</li>
  15. <li>{% trans %}Locate the desired menu and click <em>Add link</em> in the <em>Operations</em> list.{% endtrans %}</li>
  16. <li>{% trans %}Enter the <em>Menu link title</em> to be displayed.{% endtrans %}</li>
  17. <li>{% trans %}Enter the <em>Link</em>, one of the following:{% endtrans %}
  18. <ul>
  19. <li>{% trans %}An internal path, such as <em>/node/add</em>{% endtrans %}</li>
  20. <li>{% trans %}A full external URL{% endtrans %}</li>
  21. <li>{% trans %}Start typing the title of a content item and select it when the full title comes up{% endtrans %}</li>
  22. <li>{% trans %}<em>&lt;nolink&gt;</em> to display the <em>Menu link title</em> as plain text without a link{% endtrans %}</li>
  23. <li>{% trans %}<em>&lt;front&gt;</em> to link to the front page of your site{% endtrans %}</li>
  24. </ul>
  25. </li>
  26. <li>{% trans %}Make sure that <em>Enabled</em> is checked; if not, the menu link will not be displayed.{% endtrans %}</li>
  27. <li>{% trans %}Optionally, enter a <em>Description</em>, which will be displayed when a user hovers over the link.{% endtrans %}</li>
  28. <li>{% trans %}Optionally, check <em>Show as expanded</em> to automatically show the children of this link (if any) when this link is shown.{% endtrans %}</li>
  29. <li>{% trans %}Optionally, select the <em>Parent link</em>, if this menu link should be a child of another menu link.{% endtrans %}</li>
  30. <li>{% trans %}Click <em>Save</em>. You will be returned to the <em>Add link</em> page to add another link.{% endtrans %}</li>
  31. <li>{% trans %}In the <em>Manage</em> administration menu, navigate to <em>Structure</em> &gt; {{ structure_menu_link }}.{% endtrans %}</li>
  32. <li>{% trans %}Locate the menu you just added a link to and click <em>Edit</em> in the <em>Operations</em> list.{% endtrans %}</li>
  33. <li>{% trans %}Verify that the order of links is correct. If it is not, drag menu links until the order is correct, and click <em>Save</em>.{% endtrans %}</li>
  34. </ol>

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