Link image to another view mode with Media 2 and File Entity I'm trying to test Media 2.x and File Entity. I've edited the "Image" File Entity to add taxonomy terms and all and then I'm trying to leverage views to list all images in a grid in a page, and my end goal is to be able to click on a thumbnail and then get a larger image with more details.

I'm finding it complicated (impossible?) to link the images to another display (teaser to full content for instance). It works just fine with regular "Content" views but it seems that when you start with the "Files" view this is not an option.



Do you have any idea what I'm missing? Is there a way (relationship or anything) to be able to get the "Link this image to its content"-like option?
I'm not sure what you're asking. Normally you say "show title" and check "link this to content". Same thing here, Make your File view_mode whatever you want and link it to your content url. You may be asking for a Lightbox approach to showing a set of images.

If there's no option to "link to content" for this field, simply create a rewrite url in the Views Field settings to generate a link using tokens.

Now you may ask -- this isnt addressing the teaser -> full view_mode switch for the Entity (or Field?). Creating links in Views, or with the l() function has nothing todo with View Modes ... they're just links you're making.

I find it helpful to add additional view modes to entities, I have used Entity View Modes for that.

You either setup a custom URL to your content that forces the view mode, using for instance View Mode Page or you could try to set a context or something and hand code something that forces the view mode on your destination url yourself using a custom module, for a small example:

/**
 * Implementation of hook_entity_view_mode_alter().
 * Change the view mode of an entity that is being displayed.
 */
function MYMODULE_entity_view_mode_alter(&amp;$view_mode, $context) {
  if ($context['entity_type'] == 'node' &amp;&amp; $context['entity']-&gt;type == 'slang_word') {
    $view_mode = 'slang_dict_word';
  }
}


You could use a custom view mode to only show the Field in question -- with the custom view_mode set.

... maybe this rambling will help you or someone else :)