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.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | files_structure.png | 16.52 KB | anavarre |
| #7 | media_token.png | 83.08 KB | anavarre |
Comments
Comment #1
Jackinloadup commentedIt would be nice if we could have tokens for:
- title
- url
- thumbnail
and maybe other properties
Comment #2
dave reidThis is postponed pending Field tokens being fully supported.
Comment #3
yannickooWhat's going on here?
Comment #4
remkovdz commentedI'm also very interested.
Comment #5
simon_s commentedHey,
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
Comment #6
piyuesh23 commentedI 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.
Comment #7
anavarreForgot to report before that I've been playing with @piyuesh23's sandbox and it worked as advertised.
Here's the file structure:
Here's the token configuration for a given content type
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.
Comment #8
chris matthews commentedClosing 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