I have a unlimited multivalue field image gallery.

Using views i created a page for file entity and got the list of files in the field. The page displays the default original images one by one with a pager.

Created a block for the same view with the files shown as thumbnails, so the user can view all images in the gallery and click on the image he/she wants to see. I can link the thumbnails to content or file which takes me to the original file.

Is it possible i can link them to the corresponding image in the page view.

1 Answer 1


In your block view, if the "Link image to " option doesn't give you what you need for the thumbnail image field, you can build your own link using "Rewrite Results". You would do something like this:

  1. Add content:path or nid to your view, and exclude from display
  2. Make sure content:path or nid is first in you list of fields
  3. For the thumbnail image field, enable "Output this field as a link " under Rewrite Results
  4. use the token for nid or content:path (i.e. [path]) to construct the link you need

Note: if you use content:path, you will probably want to enable "Use absolute path" for it's field settings, even though it is excluded from display.

  • Hey Dave, Thanks for your time. The view is a list of files not content so i'm not getting nid or content:path only file:path also i want the image file in the block view to link to the image file in the page view. Basically am looking to create a gallery like imdb site.Ref here.
    – jack
    Nov 25, 2013 at 0:09
  • Right. You did mention that these were file entities, and I also somehow missed the views and pager part :) I'm not sure this would be a good solution, but assuming both views show the same content in the same order, then you could add a counter to the block view and construct a link (using rewrite results) to the paged view, something like: viewpath/?page=[counter].
    – Dave Bruns
    Nov 25, 2013 at 5:03
  • No luck..looks i need to learn more about file entities. For now am going with nodes like you answered. Giving a vote up. :) Thanks.
    – jack
    Nov 26, 2013 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.