Controlling a (custom content type) gallery page with a CCK block of thumbnails

Events happening in the community are now at Drupal community events on www.drupal.org.
tagsko's picture

Hi

I posted this on the drupal.org forum but I'm not getting much love so hope someone will take interest in this group :)

I am using CCK to upload and display my images: CCK, ImageAPI, ImageField, ImageCache and also CCK Blocks and CCK Block reference to display a block of thumbnails on the left hand side of the page generated from the images in the main content area.

I have set up a new content type: Gallery Page where I have used imagefield to create an upload for that page, ImageCache handles the resizing to thumbnails and cck block displays the thumbnails.

  • I wanted the main content display just to show 1 image (I am affecting the body output by using a content template for my gallery page content type, and I am only showing the first image in the array).

    <?php print $node->field_maincontentimages[0]['view'] ?>
    <?php print $node->field_maincontentimages[0]['data']['description'] ?>
  • I want the block containing the thumbnails to control which image I show in the main content area. There is already some functionality built into the block as it has a dropdown with different ways of linking to the image. I can for example link the thumbnail to the fullsize image made by imagecache.
    However, I was thinking I would try to link the thumbnails in the block so that they then determine which image in the array is displayed on my 'gallery page' (i.e., 1st thumbnail is 0, 2nd is 1 etc).

Anyone got an idea of how I could add these links "field_maincontentimages[0], field_maincontentimages[1]" to the thumbnails (automatically) and how can I edit the template page to react to those links in the block???

Functionality I have at the moment:
Node (custom content type Gallery Page with custom CCK image fields)
CCK Block <----------------------------------------- Gets content (duplicates gallery page images, imagecache rescales to thumbnails)
CCK Block (all thumbnails link to node, not specific images)

Functionality I want to acheive:
CCK Block <-------------Link------------------------ Get content from gallery page, add reference to image(s) (or add a link to the thumbnails in block to the images field_maincontentimages[0] in the array on the 'gallery page'
CCK Block --------------Link-----------------------> Node (show 1 image with 'custom template' (done))
CCK Block [thumbnail] ----------Link-------------> show different image

I don't know if I am making sense or not, but I would be SO grateful if anyone could help me out on this one!!

If it would help with a live example; here's the site in development: http://www.ripleyandfriends.com/dev/gallery/fidelity
username: drupal
password: Qwerty123

Comments

I would also be interested

kirilius's picture

I would also be interested in any tips on how to implement such functionality. I suspect you are trying to achieve something like this:

http://coppermine-gallery.net/demo/cpg14x/displayimage.php?album=random&...

I have been looking for a solution to this that doesn't require much coding but so far didn't get much luck.

I solved it

tagsko's picture

With the use of ddblock advanced slideshow / views

ddblock here: http://drupal.org/project/ddblock
how to get it working with views is also described in the ddblock tutorial + if you are using CCK imagegalleries, remember to set up a nodereference field and use that in views to display content unique to each individual gallery: http://drupal.org/node/259837#comment-1162961

Content Construction Kit (CCK)

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: