This plugin provides two field types, for selecting one or many entry types.

Template Examples

Entry Type field

Accessing an entry type field value in a template will return either the selected entry type, or null if no entry type was selected.

{% if entry.entryTypeField %}
    <p>The selected entry type is: {{ entry.entryTypeField.name }}</p>
{% else %}
    <p>No entry type was selected.</p>
{% endif %}

Entry Types field

An entry types field's value is a collection of the selected entry types.

{% if not entry.entryTypesField.isEmpty() %}
    <p>Selected entry types:</p>
    <ul>
        {% for entryType in entry.entryTypesField.all() %}
            <p>{{ entryType.name }}</p>
        {% endfor %}
    </ul>
{% else %}
    <p>No entry types were selected.</p>
{% endif %}
Installation Instructions

To install this plugin, copy the command above to your terminal.

Reviews

This plugin doesn't have any reviews.

Active Installs
56
Version
2.0.0
License
MIT
Compatibility
Craft 4, Craft 5
Last release
March 24, 2024
Categories
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs