Related files to a page

Dennis Hulsmans asked on June 10, 2016 13:23

Hi

For a specific customer we need to show related documents of a certain page. I know you can add them as attachments, but our customer wants to select multiple files which relate to a certain page from the media library (because some files are reused on other pages). Also when you use the standard attachments, you'll need to upload the files all the documents you want them on. Also when a certain documents relates to several pages you will need to change the attachment for all those pages.

The attachment datasource is not something we could use because our files would come from the media library.

Do you recommend we should use the default attachments feature or is there an other solution? Maybe something like related pages? ===>>> Related files or something like that?

Kind regards, D.

Recent Answers


Virgil Carroll answered on June 10, 2016 15:54

Check this out https://docs.kentico.com/display/K9/Displaying+related+pages+using+named+relationships

We also often add multi-select fields to the page types which do some kind of query to a group of documents or other pages. Then you can just have them display the way you want in the page transformation. The multi-select field gives you a bit more fine control to decide where you want the list the page editor can select from to come from.

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 11, 2016 05:32 (last edited on June 15, 2016 15:22)

Hey Dennis,

You've got a couple things going on here:

  • multi-use media library files
  • pages being linked to other pages using the multi-use media library files

So what I'd do is create a new custom page type that has the following fields:

  • Name
  • File - use the url selector so you can choose a media library file
  • Description

Don't use the OOTB CMS.FIle page type, as it's pretty limited and has some weird pieces when you create a new one.

Then if these are "global" documents and can be related to possibly any page, create a folder in the root of the content tree and call it what you will. In my case I call it /documents.

Then place all your new "documents" in that folder and start linking them using the link Virgil provided for related pages.

** Edit **
I should also mention if you want to search those actual documents (word, pdf, etc.) in the media library, you'll have to create a custom search index to do this. I most cases, just being able to search the title and description of that tile is enough as not everyone needs to search the actual content of the documents.

1 votesVote for this answer Mark as a Correct answer

Dennis Hulsmans answered on June 15, 2016 13:54 (last edited on June 15, 2016 13:54)

Hi

I'm getting a lot of request for this from our customers. So I'm definitely going to try this.

thanks for your responses.

KR,
D.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.