Jump to content

Shared files?


artfulrobot
 Share

Recommended Posts

Adding a files field to a template means that when I edit a page I am able to upload new files to use on that page.

However, sometimes I want one file (say Annual Report) to be featured on a number of pages. Is there any way to reference a file on another page instead of uploading a 2nd copy of the file? The problem with 2 files is that they could get out of sync if they are updated, and of course, they take 2× the storage.

Or is the only/correct way to do this:

  • Create a template (do we call these page types?) "shared files"
  • Create a shared files page: "Annual report", upload the pdf.
  • Create a page reference field to allow users to select from shared files.
  • The template for that page ref field follows the chain to return the file.

Thanks.

Link to comment
Share on other sites

Hello,

6 hours ago, artfulrobot said:

Or is the only/correct way to do this:

Let's say that is the simplest way to do it.

A couple of other ideas that might or might not suit your needs if you upload an image representing the PDF:

https://processwire.com/modules/inputfield-selectize/

Pages selectable via Inputfield Selectize can have their own PDF files uploaded to them and that way you can make those PDFs sharable across the admin.

There are similar modules for images only but they are probably not what you need.

Hope this helps.

  • Like 1
Link to comment
Share on other sites

7 hours ago, artfulrobot said:

However, sometimes I want one file (say Annual Report) to be featured on a number of pages.

If by "featured" you mean "linked to within a CKEditor field" then it's pretty easy. You just upload the file to the first page it will be used on (Page A), and on any of the other pages you use the CKE link dialog to select Page A and then select the file.

image.png.fd66adb8b161689c3a46e95c30f2fe27.png

image.png.7238be23f80ff5f136ec13d29014d5b2.png

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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