views:

19

answers:

2

What is the best way to create two dynamic unordered lists in Drupal 6.x using Views? I know how to create one dynamic list in Views but not two. I also know that one can create two separate blocks to create this output, but I do not know how to make the blocks dynamic.

Example Gallery:

// Fullsize Images
<ul class="gallery-output">
    <li><img src="example.png" /></li>
    <li><img src="example-two.png" /></li>
</ul>
// Thumbnail Images
<ul class="gallery-nav">
    <li><a href="#"><img src="example_thumb.png" /></a></li>
    <li><a href="#"><img src="example-two_thumb.png" /></a></li>
</ul>

This is for a Realtor site and I would like to be able to have this output at the start over every property to display all of its photos (in a nice and neat way!).

Any help would be greatly appreciated.

A: 

Have you considered a Views plugin, such as Views Slideshow? If nothing else, the source code for Views Slideshow will show you how to create a structure similar to the one you describe.

David Eads
+3  A: 

What you're looking for are Views attachments.

Create one display for—let's say—the main image view. Then, create a second display for, say, the thumbnail view, but choose Attachment from the drop-down list (instead of Page, Block, or Feed). Style the display however you want, and modify the Attachment settings, which will let you attach it to your other display and let you choose if it shows up before or after it.

Now, when you view the first display (like if it were a page or a block), the second display will always show up with it. Both displays will inherit the same arguments, which will let you do things like show one image and highlight its thumbnail in the thumbnail list.

Mark Trapp
Ive been toiling over this for over a week now. That did it, thanks for the info!
mtokoly

related questions