Jump to content

Mixed attachment types in custom field


bradl

Recommended Posts

Posted

How do I deal with converted IP.content → Pages databases where records have multiple, mixed attachments in a single custom field?

I have a number of IP.content databases primarily used to store attachments. One in particular was a sort of "file cabinet" with many categories.  Some were graphics oriented  — a very common use case there is "here are the assets for Event X: web-ready images in three sizes, the source PSD, club logo in EPS, and the event flyer in PDF."

The images were displayed and the non-images were downloadable with a click. Perfect.  Other categories in the same database are chock full of zips and PDFs and have no images at all.

After upgrade the previous attachment custom field is sensibly converted to an Upload field.  I see that I can set custom display formatting for any custom field (for example Display <img src="{$value}" />  and that displays the graphic attachments well enough, but most records contain mixed attachments: pdfs, psds. images, zips, etc.   

Thank you for any tips or suggestions.

Posted

Oog. I just noticed that the converted field has been set with "allow multiple uploads" set to No. So records with more than one attachment are stripped? Setting the multiple to "allow" after the fact just causes an error on display. Humph.

  • 3 weeks later...
Posted

Further to this unanswered question … even if I have to start over and recreate all similar databases from scratch (/cries) , setting the upload field to allow multiple attachments, how on earth do I make use of this information:

If using multiple uploads, $value is an array of File Objects.

What goes into the custom formatting area to output, say, a list of the attachments one per line? Bonus if it's an actual ul/li list. Or if it cannot be done in the field setting, how to change the display template to do the usual thing with the loop for other custom fields and do whatever is necessary with "array of File Objects"?

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...