0

I've got a Views table with a column displaying links to files (images, pdf's etc.). I've got a button below the table that exports the entire table. I need another button that should start a .zip download of all images currently shown in the table. The table has a filter on it, so it's important that only the files from the filtered results are downloaded.

I haven't been able to find a module or similar use case, so I hope there's someone here that can point me in the right direction.

Cheers,

1 Answer 1

0

Enable the PHP input filter and add a text area to the footer of your view, then use something like the following to build an array of all of your files (taken from this tutorial):

<?php
function views_get_current_view_result() {
  $view = views_get_current_view();
  return $view->result;
}
?>

And then use that array to build the zip according to download multiple files as zip in php

This would be a lovely idea for a views display handler plugin module, which many would probably find useful.

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.