Using CCK and (preferably) ddblock, I'm trying to make a slideshow that's node specific

That is, the 'user' enters in an article with N images in an article.

They would then like to display the article like:

[ SLIDE SHOW HERE]
--------------------
[Article Text Here]

Where the slide show displays the images FOR THAT ARTICLE.

Using a views, I was able to create a view that brings up the images for a node...and it takes the node ID in as an argument.

My questions are:

1. How do I embed the ddblock into the node? (I assume I need to edit a template file? )
2. How do I pass the node id to the view? And how do I pass the view (with the node id as teh argument) to the ddblock?

Am I just trying to do the impossible or am I just thick headed?

Thanks!

rwc

Comments

ycimlynn’s picture

Have you tried using the Insert View Module?

Works like a charm.

rwc’s picture

Just skimming the docs, would it work the a CCK node (esp. if it used the file_field type of input?)

mm167’s picture

are u trying to do something like this ?
http://www.drupalway.com/node/3

rwc’s picture

If those images are coming from that node--yes...that's close to what I want! What other options are there for that s3slider? (Can it have thumbnails to flip through the images? Or some sort of pager?) Was it easy to set up? (I assume you made your template generate the HTML for the s3slider and then it just automagically worked?)

mm167’s picture

if that's not fitting your requests, u may need to find other solutions.

good luck.

ppblaauw’s picture

At the moment the ddblock module does not support arguments yet for the view it uses.
With a small patch this can be added.

Steps to get the functionality with an imagefield in your content type of the node:

Add imagefield to node

  1. Add imagefield to the node, with amount of images set to unlimited.
  2. You can enable alt text and title for the image to provide a slide title and slide text for the slideshow.

create a view

  1. Create a view e.g. node_gallery.
  2. Set as fields your image field (DON'T GROUP THE IMAGES, YOU WANT SEPARATE ROWS).
  3. Set as filter the content type you use and published.
  4. add dummy argument Global NULL.
  5. add argument Nid with default value PHP Code: return arg(1).

create ddblock instance

  1. Enable the content type and the view in the settings page of the ddblock module.
  2. Create instance e.g. ddblock_node_gallery of the node_gallery view.
  3. Configure the instance.
  4. Add the instance to the node-[***content-type***].tpl.php.

adjust preprocess functions for ddblock module

  1. Create an if statement for you new view in both preprocess functions
  2. add the filefield and the filefield title and alternative text if enabled

Apply patch to ddblock module to add arguments functionality.

Now for every node of this content type you see the uploaded images with filefield as a ddblock slideshow.

Hope this helps you further and gives an overview what is needed to make the ddblock module handling this functionality.

I have to say: with this solution you have only the title of the image and the alternative text which can be used in the slideshow. you don't have separate fields for pager-item text (but you can use the title here also)

Tried this all on our test server and it works.

If you want to use this option, I can make more detailed instructions. Just let me know.

ppblaauw’s picture

Published the detailed How to create an Advanced slideshow with multiple imagefield images in a node

Hope this helps you create the functionality. Please let me know.
Also comments welcome on the howto, to improve it.