Skip to main content

Create a custom taxonomy

You can create a taxonomy using register_taxonomy function. Simply also allows you to directly configure your taxonomies in the config folder like this :

config/taxonomies/project-tag.yaml
taxonomy:
project_tag:
object_type: project
args:
labels:
name: Technologies
singular_name: Technologie
note

All the available parameters are the same of register_taxonomy function.

Using translation method in Yaml files

You can translate using trans(words, domain), Simply translate it to __() function.

config/taxonomies/project-tag.yaml
taxonomy:
project_tag:
object_type: project
args:
labels:
name: Technologies
singular_name: trans(Technologie, mydomain)

Using CLI

Coming soon.