Re-write Output from the Drupal 7 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:
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 …
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 …
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
It took while, but we followed up on your idea: [url=http://www.ostraining.com/blog/drupal/entity-views-attach/]http://www.ostraining.com/b…[/url]