I've gotten mildly proficient at using Views, at least when creating things like Top Rated Content or Recent content, but this Slideshow thing has me confounded. Are there any guides or basic instructions for how to make a Slideshow block, such as the one shown in the pictures on the project page for this module? Any help would really be appreciated.

CommentFileSizeAuthor
#6 broken slideshow.jpg90.41 KBWebbstre
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

redndahead’s picture

Here is a tutorial I'm thinking about adding to the module. Tell me where it can improve.

How to Create a SingleFrame Slideshow of Page Nodes

This tutorial requires Views Slideshow and Views Slideshow Singleframe
modules to be enabled. It also assumes you already have some page nodes.

Create the View

  1. Go to http://yoursite.com/admin/build/views
  2. Click Add
  3. Enter in the view name
  4. Click Next
  5. Select the page display
  6. Click Add Display
  7. Click the + next to fields
  8. Under Groups choose Node
  9. Select Node Body and Node Title
  10. Click Add
  11. Select Trim this field to a maximum length
  12. Under Maximum length enter 100
  13. Click Update Default Display twice
  14. Click the up/down arrows next to fields
  15. Move Node: Title to the top
  16. Click Update
  17. Click the + next to Filters
  18. Under Groups choose Node
  19. Select Node: Published and Node: Type
  20. Click Add>/li>
  21. Select Yes for published
  22. Click Update Default Display
  23. Select page under Node Type
  24. Click Update Default Display
  25. Click "None" next to Path under Page settings
  26. Add a path. In this case we'll put page_slideshow
  27. Click Update
  28. Click Save
  29. Click View Page and verify it is listing out the page nodes correctly

Set up the slideshow

  1. Edit the View
  2. Click Unformatted next to style under Basic Settings.
  3. Choose Slideshow
  4. Click Update Default Display
  5. Under Slideshow mode choose SingleFrame
  6. Click Update Default Display
  7. Click Save
  8. View the page and verify the slideshow is working.
Webbstre’s picture

This may be the best support response I have ever gotten on Drupal (and that includes "What you are saying is impossible" in response to a freaky bug I was having).

Seriously though, I followed your instructions, and so far, so good. I have managed to make the view as you listed and add it to my frontpage, so that it gently cycles through pages. That is excellent.

If I were to suggest anything, it would be instructions for how to do the following:

1- How to make it show only pages that have been specifically chosen for the content slider (so that admins can make it a featured content slider and restrict regular users from posting things that cycle into it).

2- How to make the images and thumbnails work instead of text, and have them link to the nodes they are meant to represent.

How hard would it be to manage those two things?

Supposedly there are a lot of modules that are supposed to make Featured Content Sliders possible, so surprisingly I have had zero luck getting any of them to work properly - I've made more progress with the instructions you gave me in about 10 minutes than I have with 5 weeks of waiting for My Issues responses on those other modules. Thank you very much!

zenrei’s picture

I uploaded the images, made my view, but nothing's coming up.

I followed all those steps, but I can't see anything.

I created a content type JUST for images. Do I have to do something special with my image content type?

Also, I can't find a mod called "Views Slideshow Singleframe". Search came up nothing, but single frame was available in the view.

zenrei’s picture

Ok, I apparently didn't have all the modules installed correctly.

Boy, do I feel dumb.

Fantastic walkthrough, though!

Thank you!

redndahead’s picture

@webbstre Thanks for the compliments. Try this one for creating image slideshows.

How to Create a SingleFrame Slideshow of Images

This tutorial requires these modules to be enabled:

Create the content type

  1. Go to http://yoursite.com/admin/content/types
  2. Click "Add Content Type"
  3. Enter a name. "Slideshow Item"
  4. Enter a type. "slideshow_item"
  5. Click the "Submission form settings" fieldset
  6. Clear the "Body" text from the "Body field label" field
  7. Click the "Workflow settings" fieldset
  8. Uncheck "Promote to frontpage"
  9. Click the "Comment settings" fieldset
  10. Set "Default comment setting" to disabled
  11. Click "Save Content Type"
  12. Next to your new content type click "manage fields"
  13. Under "New Field" enter a label. "Slideshow Image"
  14. Enter a field name. "field_slideshow_image"
  15. Select the "File" field type.
  16. Select the "Image" form element.
  17. Drag the new field using the cross handle to below the "Title" field.
  18. Click "Save"
  19. Under "Global Settings" check "Required"
  20. Click "Save field settings"
  21. Create some Slideshow Items

Create the View

  1. Go to http://yoursite.com/admin/build/views
  2. Click "Add"
  3. Enter in the view name. "slideshow"
  4. Click "Next"
  5. Select the page display
  6. Click "Add Display"
  7. Click the + next to "fields"
  8. Under "Groups" choose "Content"
  9. Select the image field you created. "Content: Slideshow Image"
  10. Click Add
  11. Under "Label" choose "None"
  12. Under "Format" choose "Image Linked to Node"
  13. Click "Update Default Display"
  14. Click the + next to "Filters"
  15. Under "Groups" choose "Node"
  16. Select "Node: Published" and "Node: Type"
  17. Click "Add"
  18. Select "Yes" for published
  19. Click "Update Default Display"
  20. Under Node Type select the content type you created "Slideshow Item"
  21. Click "Update Default Display"
  22. Click "None" next to "Path" under "Page settings"
  23. Add a path. "slideshow"
  24. Click "Update"
  25. Click "Save"
  26. Click "View Page" and verify it is listing out the images correctly

Set up the slideshow

  1. Edit the View
  2. Under "Basic Settings" click "Unformatted" next to "Style".
  3. Choose "Slideshow"
  4. Click "Update Default Display"
  5. Under "Slideshow mode" choose "SingleFrame"
  6. Click "Update Default Display"
  7. Click "Save"
  8. View the page and verify the slideshow is working.
Webbstre’s picture

FileSize
90.41 KB

Ok, I followed all the directions as mentioned, but I am hitting a snag. Instead of showing the picture, I just get a link to the image. I attached a screenshot of where the block is. If I click the link it goes to the right image just fine though.

Is this a slideshow problem, an ImageField problem, or a drupal problem? My files are all actually loaded to a separate subdomain, and get uploaded just fine, and I use htaccess redirects to make sure any funkily directed links get redirected to the correct location (in other words, all images and files load fine everywhere else).

redndahead’s picture

I missed a step. I added it as step number 12 in creating the view. Thanks for the feedback.

rodibox’s picture

Title: Any Guides or How-To's for making a slideshow block? » How to theming view of views_slideshow ?

Very good on how to use views Slideshow.
Can I ask a little guide on how themed view slideshow?
Sorry my inglis.

redndahead’s picture

Title: How to theming view of views_slideshow ? » Any Guides or How-To's for making a slideshow block?

It is not any different than themeing a view. Theme the row using this tutorial http://drupal.org/node/352970 I don't know about writing that far a tutorial.

Webbstre’s picture

I just put the view in via Mini-Panels.

Ok, I added in the step 12, now just a couple more questions:

1- Do I have to manually make sure any slideshow image is a specific size, or can it automatically create a thumbnail of sorts from an image?

2- How do I make it so if someone clicks the image it goes to a specific node for each image, rather than the node for the image?

Thanks for the help. This is one of the last steps I am taking before launching my drupal site :D

izmeez’s picture

subscribe

Webbstre’s picture

Small update.... I followed step 12 and it shows up "correctly" (as in the image appears but it is a huge screenshot) within the preview, but on the actually page it is set to show up on it is the same as the image I attached before.

redndahead’s picture

@webbstre Sorry I must have forgot to submit my response

1) You should use imagecache to automatically resize the image for your slideshow. You'll have to look up how to use imagecache and then use it instead of "image linked to node" option in step #12.

2) You can add a link cck field to your content type and then add it to your view above the image content type. In the link settings Check the exclude box. Under format choose "URL as plain text". I then theme the view and use that value to wrap my image in a url. Kind of convoluted, but works great for me. Learning how to theme a view is a good skill to learn.

Good luck.

Webbstre’s picture

Ok, I'm making progress.

1- I downloade Link Image Field for the link cck, I changed some of the steps in your directions by following the install directions and changing yours for it:

Install
-------

1) Copy the linkimagefield folder to the modules folder in your installation.

2) Enable the module using Administer -> Site building -> Modules
(/admin/build/modules).

3) Create a new linkimagefield through the CCK's interface. Visit Administer ->
Content management -> Content types (admin/content/types), then click
Manage fields on the type you want to add an image upload field. Select
"File" as the field type and "LinkImage" as the widget type to create a new
field.

4) To establish the proper display, make sure that the correct formatter is
selected. Visit Administer -> Content management -> Content types
(admin/content/types), then click Display fields on the type with the
Link Image Field. Make sure "LinkImage" is selected for Teaser and Body.

Does that last step conflict with your directions in a way that would stop it from working?

I also tried changing the minimum resolution and maximum resolution while I was editing the content type, because it said anything larger would be resized, but if I try to upload an image bigger (in the hopes it gets resized) it just gives me an error message that the file is too big.

2- Continuing my attempt to get the image resizing to work out, I put in ImageCache, and looked at the Presets, but am not sure exactly what to do. I tried a scale and crop, but maybe it didn't work well. What Preset are you using?

I'm soooooo close to getting this to work :P

Webbstre’s picture

Oh, I should mention I somehow got the uploaded image to show up properly this time. Still haven't managed to get the linking to work right yet, nor the resizing. I'm wondering if I missed something in the line in the link image instructions, where it said "3) Create a new linkimagefield through the CCK's interface." Is the CCK interface different from the rest of that instruction?

redndahead’s picture

Status: Active » Fixed

I have committed in dev these tutorials if you use the Advanced Help module. There are also screen shots.

redndahead’s picture

@Webbstre You'll really need to look into how to theme views and an intro to imagecache. You can feel free to ask questions in those issue queues. Unfortunately I'm out of spare time to go through that portion of the design. Maybe someone else here can pick it up where you need help.

Webbstre’s picture

I think I figured it out. I have to Photoshop an image together for each headline anyways, so I'll just set the standard size and not worry about resizing. I got the linking images to work, so I think I'm set! Thanks again for all the help!

redndahead’s picture

Glad it's working for you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

shekhar_mittal’s picture

subscribe

BradleyT’s picture

How do I make it so if someone clicks the image it goes to a specific node for each image, rather than the node for the image?

In CCK

Create a CCK type for your image. I call mine Slideshow Image.
Add an imagefield. I call mine field_slideshowimage.
Add a CCK Link type. I call mine field_slideshowurl.

In Views

In your view the first field should be the LINK field. (order is important)
It's output should be hidden and format is URL, as plain text

Next field should be the image field.
It's output should be re-written (Rewrite the output of this field) and the code is
<a href="[field_slideshowurl_url]">[field_slideshowimage_fid]</a> replace with the field names you see in the replacement patterns. If you don't see both fields, make sure the URL is the first output field and the image is second.
Set the format to Image.

Now your views slideshow images can be links to custom URLs or nodes. And you don't have to create a views template to do this.

Thanks to post #13 part 2 for getting me 80% of the way there.

Deslack’s picture

I would like to propose field name renames:

Create the content type

3. Enter a name. "Slide" -- It would make more sense for it to be named as such, and it fits with the other built-in content type (Page, Story/Article, FAQ, etc.)
4. Enter a type. "slide" -- see above

13. Under "New Field" enter a label. "Image" -- Drupal 7 used this field for the built-in Article, the replacement for D6's Story content type. Since both fulfill the same purpose, I think it makes more sense using an established existing name, and it would help with the standardization across core and the other modules.
14. Enter a field name. "field_image" -- see above.

It is of my opinion if you already have an existing field with the same name and purpose, use it. We could separate it in views by using the Content Type or through Taxonomy.

lias’s picture

Thanks for the how-to and information on slideshows. Great help.

APCC’s picture

On step 15, I don't have File as an option. Is something not activated? I've been at this for hours. Ah, I need File. Sorry.

syabas’s picture

I am using the guide to create a slideshow of Images.
As I followed the diferent steps, it works.
So I'm quite happy with it, thanks a lot.

In order to change the size of the slides, I have changed the format as follows:
- do steps 8 till 11
- step 12: instead of [Under "Format" choose "Image Linked to Node" ] do [Under "Format" choose "Lightbox2: format1->format2" ]

As you can see, I am using Lightbox2 to display the image, and format1 & format2 come from the Imagecache module. The format1 size will be used by the slideshow, and if you click on it, it will display format2. For completeness, I am using a 600-width size for format1 and a 800-width for format2.
I assigned a "path" to this view, and it works nicely.

But I would like to have this view in a block. No matter what I try, I cannot get anything to display in a block. The block is created, I enable this block by asigning it to an area of a certain page, but on the page itself there is nothing displayed: no title, no images, no slideshow. Any clues?

BananaJota’s picture

Status: Closed (fixed) » Needs review

Hello guys....
In my page, i have no promoted post's. Just the block with te slideswho views, and two more blocks with other views.
So i have the default page asking for create content or personalize site above and the blocks with views bottom. How do i delete that default page?
thanks in advance

dropfoundry’s picture

Thanks @redndahead for Image Slideshow Tutorial and thanks also to BradleyT for the info on how to link to somewhere other than the image node. One of the rare times here where I am able to find the answers to both my questions in one place.

Jean Rodas’s picture

#26 syabas

Did you try the block with the Preview Buttom in the View? Your sure you call the area properly? Try to call the block with this code

<?php
			$block = module_invoke('block', 'block', 'view', 'name_of_the_block');
			print $block['content'];
			?>
AdrianC-1’s picture

Any thoughts on the best way to get the slideshow to use a random image?

Jean Rodas’s picture

If you're using view slideshow there's a random option in SingleFrame mode.

syabas’s picture

Thanks Jean.
I started all over, and this time I used "add display"-> Block instead of Page, and now it works.

And I followed the same procedure on another website, and this one shows no images at all, not matter what I try. Only the pager is shown. This second website has multilanguage support installed, but I doubt that this would cause the blank page or block.

syabas’s picture

Got it already, mea culpa. Forgot to enable Views SingleFrame.

redndahead’s picture

Status: Needs review » Fixed

Moving back to fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.