| Drupal

Re-write Output from the Drupal Media ModuleOne of the great things with Drupal is the ability to over-write just about anything!

We had a question in our support forums this week which put that ability to the test.

Our member wanted to provide a way for her clients to upload a PDF into a node and allow her users to easily download them. However, instead of a PDF icon and the title of the PDF, she wanted the link to say "Download PDF".

She had already created the content type and a file upload which used the Media module. The Media module is perfect for her clients who are not highly technical.

The problem was that our member's version of Media doesn't allow for re-writing the output without digging into the code, which she didn't want to do..

Display Suite and Views to the Rescue

Using a fairly simple view, we were able to insert the re-written link into the node via Display Suite.

If you're not familiar with either of these modules, we have Views and Display Suite classes for our members here at OSTraining.

Below is a quick tutorial on creating the override:

About the author

Rod holds two masters degrees and has been training people how to do "things" for over 25 years. Originally from Australia, he grew up in Canada and now resides just outside Cincinnati, Ohio.