Search code examples
drupalviewargumentsdrupal-theming

Drupal: Dynamic View using Arguments


For a current project i need to setup a specific view to display a gallery detailpage. It should work like this:

1. User clicked a node (costum-post-type: gallery)
2. User received an overview page with linked images
3. User clicked an image
4. User received the gallery page (gallerific view)

Step 1-3 are done. But how can I get Drupal to build a detail page using the data of the overview page?

For Example something like this: http://example.com/gallery-1/detail or http://example.com/gallery-2/detail.

/gallery-n is the overview page with linked images and detail is the detailpage of /gallery-n.

Hope you'll understand what i mean?!

EDIT

On the overview page i have a bunch of thumbails which each are linked to the detail gallery (jquery galleriffic) page.


Solution

  • If I'm correct understand your problem you should do this things.

     1. Create view1 for page with linked images. It should be page display with http://example.com/images/%nid
       where %nid is nid argument of gallery. 
     2. Create view2 for gallery detailed page. it should be page display with http://example.com/%nid/detail 
     3. Theme that views as you want.
     4. For view1 for image field use override output in field settings to make it links to %nid/detail
    

    P.S. Use relationships where needed. If description is not clear, fill free to ask.