Jump to content

Make files from files field available to all CKEditor fields


DrQuincy
 Share

Recommended Posts

If you have a Files field in the same template as a Textarea CKEditor field when you insert a link you can link to any of the files uploaded to the aforementioned files field. The same goes for Images fields and inserting images.

Is there a way to have a central Files field as part of say a document-storage template and have all files uploaded here available to all Textarea CKEditor fields regardless of what template they are on?

In searching for an answer I found Media Manager, which looks interesting. But I wondered if there was a way within the Processwire core to do this. I know I could make each file a page and that could be selected from CKEditor and then I do something in my code to read the file but was more interested in linking directly to the file in this instance.

Thanks.

Link to comment
Share on other sites

1 hour ago, DrQuincy said:

Is there a way to have a central Files field as part of say a document-storage template and have all files uploaded here available to all Textarea CKEditor fields regardless of what template they are on?

Technically files on any page are available to link to on any other page. You use the "Select Page" field to choose the page that holds the file you want to link to and then select a file from that page.

2021-06-29_193255.png.586c42db9f389f4601b612c696980bab.png

But to make it quicker to select files from one or more special "library" pages there is this handy module: https://processwire.com/modules/media-library/

  • Like 2
Link to comment
Share on other sites

Quote

You use the "Select Page" field to choose the page that holds the file you want to link to and then select a file from that page.

Sometimes you can't see the forest for the trees, thanks! ?

Thanks, also for module you linked to, that looks great.

You seem to crop up the minute I ask a question here; I most owe you a fair few beers by now. ?

  • Like 1
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...