field_ui.add_field.html.twig
Same filename in other branches
--- label: 'Adding a field to an entity sub-type' related: - core.content_structure - field_ui.manage_display - field_ui.manage_form --- {% set content_types = render_var(url('entity.node_type.collection')) %} {% set content_structure = render_var(url('help.help_topic', {'id': 'core.content_structure'})) %} <h2>{% trans %}Goal{% endtrans %}</h2> <p>{% trans %}Add a field to an entity sub-type; see <a href="{{ content_structure }}">Managing content structure</a> for an overview of entity types and sub-types.{% endtrans %}</p> <h2>{% trans %}Steps{% endtrans %}</h2> <ol> <li>{% trans %}Navigate to the page for managing the entity sub-type you want to add the field to. For example, to add a field to a content type, in the <em>Manage</em> administrative menu, navigate to <em>Structure</em> > <a href="{{ content_types }}"><em>Content types</em></a>.{% endtrans %}</li> <li>{% trans %}Find the particular sub-type that you want to add the field to, and click <em>Manage fields</em>.{% endtrans %}</li> <li>{% trans %}Click <em>Add field</em>.{% endtrans %}</li> <li>{% trans %}In <em>Add a new field</em>, select the type of field you want to add; see <a href="{{ content_structure }}">Managing content structure</a> for an overview of field types.{% endtrans %}</li> <li>{% trans %}The <em>Label</em> field should now be visible; enter a label for the field, which is used as the field label for both content editing and content display.{% endtrans %}</li> <li>{% trans %}Click <em>Save and continue</em>.{% endtrans %}</li> <li>{% trans %}On the next screen, enter a value for <em>Allowed number of values</em>. You can limit the field to one value per entity item, a set number of values, or set it to have unlimited values. Click <em>Save field settings</em>.{% endtrans %}</li> <li>{% trans %}On the next screen, optionally edit the settings for the field, which vary depending on what field type you are creating. For all fields, you can edit the <em>Label</em>, <em>Help text</em> (text to be displayed below the field on the content editing page), and <em>Required field</em> (to make it so a value must be entered in order to save the content when editing). You can also configure a default value for the field.{% endtrans %}</li> <li>{% trans %}Click <em>Save settings</em>. You should be returned to the <em>Manage fields</em> page, with your new field in the list.{% endtrans %}</li> </ol>
File
-
core/
modules/ help_topics/ help_topics/ field_ui.add_field.html.twig
View source
- ---
- label: 'Adding a field to an entity sub-type'
- related:
- - core.content_structure
- - field_ui.manage_display
- - field_ui.manage_form
- ---
- {% set content_types = render_var(url('entity.node_type.collection')) %}
- {% set content_structure = render_var(url('help.help_topic', {'id': 'core.content_structure'})) %}
- <h2>{% trans %}Goal{% endtrans %}</h2>
- <p>{% trans %}Add a field to an entity sub-type; see <a href="{{ content_structure }}">Managing content structure</a> for an overview of entity types and sub-types.{% endtrans %}</p>
- <h2>{% trans %}Steps{% endtrans %}</h2>
- <ol>
- <li>{% trans %}Navigate to the page for managing the entity sub-type you want to add the field to. For example, to add a field to a content type, in the <em>Manage</em> administrative menu, navigate to <em>Structure</em> > <a href="{{ content_types }}"><em>Content types</em></a>.{% endtrans %}</li>
- <li>{% trans %}Find the particular sub-type that you want to add the field to, and click <em>Manage fields</em>.{% endtrans %}</li>
- <li>{% trans %}Click <em>Add field</em>.{% endtrans %}</li>
- <li>{% trans %}In <em>Add a new field</em>, select the type of field you want to add; see <a href="{{ content_structure }}">Managing content structure</a> for an overview of field types.{% endtrans %}</li>
- <li>{% trans %}The <em>Label</em> field should now be visible; enter a label for the field, which is used as the field label for both content editing and content display.{% endtrans %}</li>
- <li>{% trans %}Click <em>Save and continue</em>.{% endtrans %}</li>
- <li>{% trans %}On the next screen, enter a value for <em>Allowed number of values</em>. You can limit the field to one value per entity item, a set number of values, or set it to have unlimited values. Click <em>Save field settings</em>.{% endtrans %}</li>
- <li>{% trans %}On the next screen, optionally edit the settings for the field, which vary depending on what field type you are creating. For all fields, you can edit the <em>Label</em>, <em>Help text</em> (text to be displayed below the field on the content editing page), and <em>Required field</em> (to make it so a value must be entered in order to save the content when editing). You can also configure a default value for the field.{% endtrans %}</li>
- <li>{% trans %}Click <em>Save settings</em>. You should be returned to the <em>Manage fields</em> page, with your new field in the list.{% endtrans %}</li>
- </ol>
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.