Associating files/a fileset with a page

Permalink
Hi all

I have a 'project' page type to which I'd like to associate a number of files. At present project pages are created using the Composer and have a reference page attribute (like 'ABC123').

There seem to be two obvious options - (i) create a file set with a name that matches the project's ID, then programmatically display the set on the project page using the List File Set addon, or (ii) create an additional file attribute (e.g. project_id) which is populated with text that matches the project page reference, then find a way to list those files on the project page.

Neither of these are as elegant as I would like because they rely on the client being really accurate with the project refs when, after creating the page, they do into the File Manager to either create the File Set or tag the files.

Is there a way to programmatically associate files with pages (created in Composer) at page creation time? My ideal situation would be the following steps:

1. Type in page information, including Project Reference, into Composer
2. Select one or more files in Composer
3. File set is automatically created using Project Reference as name, and files are uploaded into it
4. Files are automagically displayed on the created project page.

I suspect that might not be possible because of the integration between the publishing of the page and the uploading of the files, but I'd probably be happy with the compromise of the File Set being automatically created, ready for the client to then go to the File Manager and upload files into it.

Does this sound sensible? Or is there a better approach?

EDIT: have just come across Tony's multiple file attribute. It looks like it could fit the bill.

melat0nin
 
mesuva replied on at Permalink Reply
mesuva