form-mode-manager-add-list.html.twig in Form mode manager 8
Default implementation to present a list of bundles as specific form mode.
Available variables:
- bundles: A list of bundles, each with the following properties:
- description: Bundle description.
- add_link: Link to create an entity of this bundle as specific Form mode.
- add_bundle_message: The message shown when there are no bundles. Only
1 theme call to form-mode-manager-add-list.html.twig
- EntityFormModeBase::addPage in src/
Controller/ EntityFormModeBase.php - Displays add content links for available entity types.
File
templates/form-mode-manager-add-list.html.twigView source
- {#
- /**
- * @file
- * Default implementation to present a list of bundles as specific form mode.
- *
- * Available variables:
- * - bundles: A list of bundles, each with the following properties:
- * - description: Bundle description.
- * - add_link: Link to create an entity of this bundle as specific Form mode.
- * - add_bundle_message: The message shown when there are no bundles. Only
- *
- * @see template_preprocess_form_mode_manager_add_list()
- *
- * @ingroup themeable
- */
- #}
- {% if types is not empty %}
- <dl>
- {% for type in types %}
- <dt>{{ type.add_link }}</dt>
- <dd>{{ type.description }}</dd>
- {% endfor %}
- </dl>
- {% else %}
- <p>
- {% set create_content = path('node.type_add') %}
- {% trans %}
- You have not created any content types yet. Go to the <a href="{{ create_content }}">content type creation page</a> to add a new content type.
- {% endtrans %}
- </p>
- {% endif %}