2

I need to add an image to a vocabulary, not the taxonomy terms. Essentially, I need to add a field to the "Edit Vocabulary" page.

Is there a way to do this?

3
  • Have you tried replacing/overriding Drupal\taxonomy\Drupal\taxonomy\VocabularyForm, or implementing hook_form_alter()?
    – Beau
    Jul 14, 2021 at 14:57
  • I haven't. I know what you mean. I guess my question would be, after altering the form then adding a field, where is it going to be stored?
    – xpersonas
    Jul 14, 2021 at 17:24
  • Depending on your use case, you could just use a single configuration object to store all VID:FID relationships, or one config object per vocab, if that suits your needs better. You could could also get creative, using plugins and a deriver, or define a very simple entity type just for VID companion images. It all depends on your use case and requirements. All things being equal, I would probably just use a single configuration object.
    – Beau
    Jul 14, 2021 at 17:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.