entity-add-list.html.twig in Entity API 8.0
Default theme implementation to present a list of available bundles.
Available variables:
- create_bundle_url: The url to the bundle creation page.
- bundle_type_label: The lowercase label of the bundle entity type.
- bundles: A list of bundles, each with the following properties:
- add_link: link to create an entity of this bundle.
- description: Bundle description.
See also
1 theme call to entity-add-list.html.twig
- EntityCreateController::addPage in src/
Controller/ EntityCreateController.php - Displays add links for the available bundles.
File
templates/entity-add-list.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to present a list of available bundles.
- *
- * Available variables:
- * - create_bundle_url: The url to the bundle creation page.
- * - bundle_type_label: The lowercase label of the bundle entity type.
- * - bundles: A list of bundles, each with the following properties:
- * - add_link: link to create an entity of this bundle.
- * - description: Bundle description.
- *
- * @see template_preprocess_entity_add_list()
- *
- * @ingroup themeable
- */
- #}
- {% if bundles is not empty %}
- <dl>
- {% for bundle in bundles %}
- <dt>{{ bundle.add_link }}</dt>
- <dd>{{ bundle.description }}</dd>
- {% endfor %}
- </dl>
- {% else %}
- <p>
- {% trans %}
- Go to the <a href="{{ create_bundle_url }}">{{ bundle_type_label }} creation page</a> to add a new {{ bundle_type_label }}.
- {% endtrans %}
- </p>
- {% endif %}