Re-write Output from the Drupal 7 Media Module

Re-write Output from the Drupal Media Module

One 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:


  • 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. He has worked in both the non-profit and for-profit worlds, in small companies and large corporations. His extensive open source experience includes WordPress, Joomla and Drupal and he really knows how to help you get the most out of the system you chose. Rod plays ice hockey a couple of times a week and rides his Goldwing motorcycle pretty much everywhere he can.

0 0 votes
Blog Rating
Notify of
Newest Most Voted
Inline Feedbacks
View all comments

Is there anyway to do this without the Display Suite. Display Suite is a very big and complex module. If you don’t have it already installed for another reason, it is a very expensive solution to achieve the goal for this tutorial Any other light weight alternative you can think off?


Hi hgurol, see below for Jean-Francois idea …

Jean-Francois Bohemier

I believe you can achieve the same with just EVA (Entity Views Attach). It attaches a view to an entity – node content in this case.


Hi Jean-Francois. Nice idea, thanks. Sounds like a potential follow-up tutorial to us …

Jean-Francois Bohemier

Hi Steve, and thanks for the tutorials 🙂

I really like EVA. I use it in many places… It creates a field in your content’s display settings, so you can put it anywhere you want, then it attaches a view to that field.


Smart thinking, thanks Jean-Francois


Hi Jean-Francois
It took while, but we followed up on your idea: [url=]…[/url]

Would love your thoughts, please comment.x