0

I am using "migrate api" for migrate content from another database (not drupal database).

I need migrate multilingual content with multiple images associated where alt and title are also multilingual.

How must I build this migrate yml for the images?

I have the next config for a unique image file:

'field_image/target_id':
    plugin: migration
    migration: news_image
    source: file
'field_image/alt': 'alt text'

but I don't know how build this config for save multiple values instead one. I searched for examples and in documentation but I didn't find anything similar.

I don't need a manual, only a orientation of how must be the configuration.

Thanks!

3
  • Please be aware that we do not provide tutorials or step-by-step instructions for achieving functionality from a description, screenshot or other website, as explained in the help center. Instead edit the question to include your attempt(s) to achieve the desired functionality and be as complete as possible. What have you tried, what did you expect, what actually happened? If you have any code to include in the question, please add it. The more complete you are, the better we can formulate an answer. Commented Sep 5, 2017 at 11:45
  • Hi @Neograph734, sorry for the issue that I created, I didn't explained correctly the problem. I added more information to the issue. If it isn't enough, I can try add more.
    – cbccharlie
    Commented Sep 5, 2017 at 12:33
  • It is better now :) Commented Sep 5, 2017 at 12:42

1 Answer 1

0

In the end, it was easy. Just follow the steps below:

  1. Import files (only files, without alt and title)
  2. Import content. For the field of image must have all the identifiers of the images and the alt and title. It is necessary to use the iterator plugin.

  field_images:
    plugin: iterator
    source: IMAGESVAL
    process:
      target_id:
        plugin: migration
        migration: news_images
        source: fid
      alt: alt
      title: alt

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.