Score:0

Programmatically add a taxonomy field to a custom content type

ng flag

I'm familiar with adding fields to a custom content type in the yaml files of the module. I'm unable to find an example of how to add taxonomy fields to a content type at programmatically at install.

What does the field.field.node look like?

What does the field.storage.node look like?

Are there special names for the widgets for core.entity_form_display and core.entity_view_display?

Thank you

4uk4 avatar
cn flag
Yes, there are special plugin names for all of them and each of them has specific options you need to set. AFAIK there's no real official documentation, but you can use the UI to configure the field and then you'll find a working example in the exported YAML files.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.