I'm trying to create a module that creates its own content types during installation. I understand that I need to use the Configuration API and the Entity API, but I'm having trouble adding Drupal-included fields to my custom type. From what I understand, I need to have a file for each field called file.file.node.content_type.field_type.yml. Am I correct in my understanding? If so, why are their two fields and where can I find the options to place in that configuration file?

Comments

blakemorgan’s picture

I mean field.field.node.content_type.field_type.yml. Please pardon the typo.

Jaypan’s picture

I always create the fields through the admin API, then export them using the config manager module. If unsure about what to name the files, then you can export the entire config (which creates the files), then pick and choose your files from there.

sachinsuryavanshi’s picture