-1

I'm using the https://drupal.org/project/views_data_export module to export a Views list of content as a CSV file.

The content has an image field (multiple values in it) then the CSV data show nothing for the images. I need to output the name of the image file.

I tried adding a Relationship field: File Usage: File but I get duplicated row (one for each image in each node)

I need to output a CSV file, something like:

TITLE, IMAGES
"my dog title" , "dog-picture-1.jpg, dog-picture-2.jpg"
"my cat title" , "cat-picture-1.jpg, cat-picture-2.jpg"

How can I sort this out?

0

Use Rewrite the output of this field option and add your fields like title, image1, image2.

1). In image1 field, use the rewrite option and use the taken of your image like

[field_gallery_fid]

and set the Group multiple values like below image

enter image description here

2.) In image2 field, use the rewrite option and use the taken of your image like

"[title]" ,"[field_gallery_fid],[field_gallery_fid_1]"

and set the Group multiple values like below image

enter image description here

Note: Suppose if you have 10 images, you can repeat the above steps, but if you have "n" number of images, then it will not work out for you.

  • I have "n" number of images. thanks anyway – chefnelone Nov 27 '13 at 7:29
0

You have to install Image URL Formatter

This module add a url formatter for image field. Then you can output image url directly.

Most of the code, maybe more than 90%, is just copy from the drupal core. I think it is stable enough.

I have created a content type, and add an image field instance to it, later I use views to export the data of this content type.And I want to output the data,then I could import it into another drupal 7 site with feeds module. What I need is the URL of the image field, but I could not export the image URL directly. That is why I create this small module.

  • Please add some more details about WHY you recommended this module (apart from some module details that Krisna already added, to make it look less like a link-only answer, which often gets deleted by moderation, sinces that's considered as a low quality answer). – Pierre.Vriens Dec 23 '15 at 14:45

Your Answer

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

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