It would be extremely handy if Media defined some media-field-value tokens, so modules like, but not restricted to, Custom Formatters could use the tokens when creating Token based formatters.

I'm sure there are plenty other benefits to having Media tokens, but I'm just concentrating directly on my personal needs at this moment.

Hope you consider.

Cheers,
Deciphered.

CommentFileSizeAuthor
#7 files_structure.png16.52 KBanavarre
#7 media_token.png83.08 KBanavarre

Comments

Jackinloadup’s picture

It would be nice if we could have tokens for:
- title
- url
- thumbnail

and maybe other properties

dave reid’s picture

Status: Active » Postponed

This is postponed pending Field tokens being fully supported.

yannickoo’s picture

What's going on here?

remkovdz’s picture

I'm also very interested.

simon_s’s picture

Hey,

At the moment it is already possible with the help of the Rules Module.

I just tested to set the node TITLE to the MEDIA YOUTUBE FILENAME after creating OR updating a node.
Works perfect!

Hint: Use the Rules Data Selector to drill down to your video field properties.

e.g. something like this:
node:field-video:0:file:name

Versions used:
Media 7.x-2.0-unstable6
Media Youtube 7.x-2.0-rc1
Rules 2.2
and all depending current entity api and entity token stuff...

Cheers,
Simon

piyuesh23’s picture

I have written a custom module for this(as i needed it urjently for one of the projects i was working on). Link to the sandbox project is here http://drupal.org/node/1716774.

anavarre’s picture

StatusFileSize
new83.08 KB
new16.52 KB

Forgot to report before that I've been playing with @piyuesh23's sandbox and it worked as advertised.

Here's the file structure:

files_structure.png

Here's the token configuration for a given content type

media_token.png

I know that this issue is waiting on Field tokens being fully supported but that sandbox module is pretty cool for those who can't wait or need to scale with numerous multimedia assets that need to be split across several dirs.

chris matthews’s picture

Issue summary: View changes
Status: Postponed » Closed (outdated)

Closing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team