0

I'm trying to create a metatag field (from the metatag module) to my content type programmatically. I know how to create a textfield to my content type (by using the node.module as example) but can't find any documentation on how to do this with a metatag field.

What should the field.storage file in the config/install folder look like. This is what I use for my regular text field.

langcode: en
status: true
dependencies:
  module:
    - node
    - text
id: node.page_description
field_name: page_description
entity_type: node
type: string_long
settings: {  }
module: text
locked: false
cardinality: 1
translatable: true
indexes: {  }
persist_with_no_fields: true
custom_storage: false
  • Did you create one and then export it to see it? – Kevin Jan 13 at 0:09
  • You mean with a config export? If so, that is as great idea. I was wondering how I could figure this out myself. I'll try th at. – Joost Jan 13 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.