18.11.2015 Views

Beginning Drupal 8

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 4 ■ Taxonomy<br />

Figure 4-6. Available content types<br />

To the right of each content type in the list, you’ll see a “Manage fields” button for managing the fields<br />

associated with that content type. You’ll learn in Chapter 5 how to add several types of fields to your content<br />

type (e.g., you may wish to add a file upload field, an additional text box to collect specific information, check<br />

boxes, radio buttons, or a select list to expand the content collected when someone uses that content type).<br />

For now we will concentrate on adding the taxonomy vocabulary to our content type so that an author can<br />

select one of the types of sports terms.<br />

Click the “Manage fields” button to the right of the Article description to expose the form used to add<br />

your vocabulary (see Figure 4-7). On this form, you will find a button called “Add field.” Click this button to<br />

begin the process of adding your taxonomy field.<br />

Figure 4-7. Managing fields<br />

On the “Add field” screen, select “Taxonomy Term” from the drop-down list labeled “Add a new field.”<br />

In the field titled Label, enter a descriptive title that will appear on the content editing form, informing<br />

the content author what the purpose of this field is. For our example, enter “Type of sport.” Click the “Save<br />

and continue” button. On the next screen you have the option to specify how many values from the list<br />

the author may select when creating an article. The default value is Limited to one term from the list. For<br />

the example, we want the author to have the ability to select several of the terms in our “Type of sport”<br />

vocabulary, so we change the value in the select list from Limited to Unlimited. Next, click the “Save field<br />

settings” button to continue to the settings page.<br />

40

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!