Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Bought Jack McDade's course on design. Going through it now...and it is SO well done!

— Justin Jackson, Transistor.fm

Taxonomies Fieldtype

Allows you to choose one or more taxonomies.

The Taxonomies Fieldtype in action!

Usage

This fieldtype is used to view and select from a list of Taxonomies.

fields:
my_taxonomies_field:
type: taxonomies

Data Structure

The Taxonomies fieldtype is a Relationship fieldtype, and will save the taxonomies as their handles.

taxonomies:
- genre
- cool_factor

Templating

You're more than likely using this field as a way to dynamically display Terms from one or more Taxonomies.

The following example assumes max_items has been set to 1:

<ul>
{{ taxonomy :from="my_taxonomy_field" }}
<li>{{ title }}</li>
{{ /taxonomy }}
</ul>
<ul>
<statamic:taxonomy
:from="$my_taxonomy_field"
>
<li>{{ $title }}</li>
</statamic:taxonomy>
</ul>
<ul>
<li>Comedy</li>
<li>Drama</li>
<li>Dramedy</li>
</ul>

Options

max_items

integer

The maximum number of items that may be selected. Setting this to 1 will change the UI to a select dropdwon.

mode

string

Set the UI style for this field. Can be one of 'default' (Stack Selector), 'select' (Select Dropdown) or 'typeahead' (Typeahead Field).

HR: Section
Learn More!

Choose from one or more taxonomies.

Tags

Docs

shipment-container

Repositories

HR: Section
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →