0

I could really use some help here. Might have promised something that cannot be done.

I am creating a simple doc repository for a client. The idea is for each of their "jobs", they create a unique asset folder. They upload a bunch of assets to it and then create a "review" entry that shows particular assets to be reviewed by their client. Sometimes these are html emails, or banner images, or even videos they create.

Anyway, each asset needs a "view" link {url} and then a "download link". The download is always a zip file which might contain more files than just the {url} file. My current code is:

{asset_files}
<h2 class="tableHeads">{title}</h2>
<p class="tablecity">
{if desc}{desc}<br />{/if}
<a href="{url}" target="_blank">view</a> | <a href="{url}">download</a>
</p>
{/asset_files}

How would you go about making the download link point to the zip asset without actually making a new entire asset entry out of it?

I am at a loss here and could really use some ideas.

Thanks

Mike

Hi again,

I changed the links to:

<a href="{url}" target="_blank">view</a> | <a href="{url}.zip">download</a>

But this requires the zip file be named exactly the same as the asset and also, I am not including the zip files in the entry itself. It works but is really funky and not really an ideal solution.

1
  • For me it's unclear how the name of the zip-archive is generated if it is not the same as {url}.zip. – BNetz Apr 22 '14 at 10:16
1

Have a look at either MX Zip, or to get more advanced, Link Vault and Link Vault Zipper. These add-ons create ZIP files on the fly for you from a list of file URLs you feed to them.

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.