I'm having trouble getting my slideshow to appear in a View. I might be confused about how it's supposed to work, but based on what the Project page says, I think/hope I'm on the right track -- "These formatters are used in two places in particular: the CCK display settings and in a view (provided by the views.module)."
The slideshow works perfect as expected if I enable it for a node/content type and look at the node in question, but the output of the custom View page/block I've made (in list view), which includes the requisite image field and slideshow formatter option, outputs nothing but the empty surrounding HTML tags, and no image fields, no slideshow. I've tried both with an un-themed and themed view with the same results. I've also tried both page and block views. Without the "CCK Slideshow" option, the image fields print into the view output like normal... with the option on, nothing prints at all. I've tried with "group multiple values" and "do not group multiple values".
HTML output for un-themed view:
<div class='view view-Latest-Photos'><div class='view-content view-content-Latest-Photos'><div class="item-list"><ul><li><div class='view-item view-item-Latest-Photos'><div class='view-field view-data-node-data-field-album-images-field-album-images-fid'></div></div>
</li></ul></div></div></div>
HTML output for basic themed view:
<div class='view view-Latest-Photos'><div class='view-content view-content-Latest-Photos'><div class="item-list"><ul><li></li></ul></div></div></div>
I've also tried adding this code snippet to my themed view, with no luck:
(my multiple-value image field is called "field_album_images")
<?php
print $node->content['field_album_images']['#value']
?>
I noticed that on a view, unlike a node page that has the CCK Slideshow on it, the custom CSS and Javascript isn't added to the header of the page... to test whether this was the problem, I copied the code out of the source from a node and pasted it into the head of my page.tpl.php file. I then reloaded the view page, but there was still no change (probably since there were no image fields printed out of course). I also saw that the additional jQuery .js files weren't loaded on the view the way they were on the node, so no clue about that.
As another test, though it causes the slideshow to appear on the node (which in this case I "don't" want, as I'm trying to display a grid of thumbnails on the node - the slideshow is just for my "latest photos" view-based page), I've also tried enabling cck_slideshow in the Display options for my image field. This has no effect on the View whether enabled or not.
Here's an export of my view... maybe I'm doing something wrong that you'll be able to notice:
$view = new stdClass();
$view->name = 'Latest_Photos';
$view->description = 'Latest photos, drawn from the image field of the most recent Photo Album node.';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'Latest Photos';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'list';
$view->url = 'media/latest-photos';
$view->use_pager = FALSE;
$view->nodes_per_page = '1';
$view->sort = array (
);
$view->argument = array (
);
$view->field = array (
array (
'tablename' => 'node_data_field_album_images',
'field' => 'field_album_images_fid',
'label' => '',
'handler' => 'content_views_field_handler_group',
'options' => 'cck_slideshow',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'photo_album',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node_data_field_album_images, node);
$views[$view->name] = $view;
Anyhow, whew :P more than I was planning on writing haha. Hope this helps. Thanks in advance for any help you can give, and thanks for the great module :)
Comments
Comment #1
205 CTT commentedI am also having trouble. I havent yet been able yet to have the cck slideshow appear at all. Whether it is on node, list, table or block view nothing comes up. I have set automatically css on.
I am using 5.x
Please help...and thanks for providing a great module.
/Jakob
Comment #2
stamat commentedI am looking for a free slideshow and CKK seems to be what I am looking for. Unfortunatelly I am having the same problem, i am unable to make the slideshow at all. I want to use it throught the views module, but instead of a slideshow I am getting the declared "View type" (FullNode, List, ..) , i.e. the field option set to CKK Slideshow doesnt change a thing.
I am sure that the problem is my misunderstanding , but I have to admit that the documentation is not really sufficient.
Please help us with a more descriptive instruction on how to use the module.
Thanks in advance !
P.S Here is my View Export =>
$view->name = 'SlideshowTest';
$view->description = '';
$view->access = array (
);
$view->view_args_php = '';
$view->page = FALSE;
$view->page_title = 'Portfolio Slideshow Test';
$view->page_header = '';
$view->page_header_format = '3';
$view->page_footer = '';
$view->page_footer_format = '3';
$view->page_empty = '';
$view->page_empty_format = '3';
$view->page_type = 'node';
$view->url = 'slideshow';
$view->use_pager = TRUE;
$view->nodes_per_page = '5';
$view->block = TRUE;
$view->block_title = '';
$view->block_header = '';
$view->block_header_format = '3';
$view->block_footer = '';
$view->block_footer_format = '3';
$view->block_empty = '';
$view->block_empty_format = '3';
$view->block_type = 'table';
$view->nodes_per_block = '5';
$view->block_more = TRUE;
$view->block_use_page_header = FALSE;
$view->block_use_page_footer = FALSE;
$view->block_use_page_empty = FALSE;
$view->sort = array (
);
$view->argument = array (
);
$view->field = array (
array (
'tablename' => 'node_data_field_imagefield',
'field' => 'field_imagefield_fid',
'label' => '',
'handler' => 'content_views_field_handler_group',
'options' => 'cck_slideshow',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'portfoliopart',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node_data_field_imagefield, node);
$views[$view->name] = $view;
Comment #3
ellanylea commentedI followed the README.txt to the letter. The only way I've gotten the slideshow to appear is to upload *multiple* images into *one* cck-node's imagefield.
At first, I uploaded one image per cck-node and nothing happened - no slideshow, probably because there was nothing else to rotate through. Since the README.txt file says "This new imagefield MUST BE MULTIPLE VALUE to work with slideshow", it would make sense to upload multiple images into one cck-node. Then, when I go to that node, the slideshow appears!
With Views, only the "Full node" and "Teaser" view types work. "Table" and "List" gives me nothing, even if I select the option for the imagefield as "CCK Slideshow".
Comment #4
dnewkerk commentedCorrect, it only works with multiple-value CCK imagefields. I've got it to work fine in any node or teaser view, as you have... but no luck at all with Views, even when all the settings seem to check out as they ought to be. Probably needs a patch, but I'm pretty sure quicksketch will be too busy with Drupal 6 core for a while to get to this (which is good haha - he's doing fantastic and amazing things for Drupal 6 - can anyone say "drag and drop menus/blocks and more"!)... so if anyone else has the know-how to patch this (aka not myself haha), please do.
Comment #5
quicksketchPersonally I've never used CCK Slideshow with views, this was probably a mis-assumption on my part that it would work with views at the time when I wrote the README. Right now I think it will work with views, but only in teaser or node views, not in lists or tables. I think this *should* be possible, but CCK Slideshow is using some unconventional means to modify the entire group of fields at once, so it doesn't work with the views integration provided by CCK.
Comment #6
dnewkerk commentedHey Nathan, thanks for the response :)
No worries... I ended up recently discovering the Views Slideshow module and have found that it does what I need it to do (actually worked out better for my particular case in the end, since I decided to feed the slideshow with the latest photo nodes from my custom CCK/Views gallery). I'll be posting a tutorial in the Handbook as soon as I get a breather, for those who'd like to know how to do it (e.g. making the whole integrated gallery, slideshow, etc)... maybe a screencast too :) I also had trouble getting multiple-value Image fields to play nice with all the other applications I wanted to reuse the images for throughout the site (particularly in theming them individually within Views), so it didn't end up being ideal for me to make use of the multiple-value fields in this case.
Again, thanks Nathan for all the great work you do for Drupal.... I'm soooo looking forward to drag and drop :D
Comment #7
quicksketchThe CCK Slideshow module is no longer maintained.