Let's say I have a slideshow view with 5 items and a certain order (e.g. node edit date). Is there a way to call the view with some arguments or parameters to start with slide that would be the 3rd in the defined order?

Comments

jsimonis’s picture

Yes, the filter is going to sort the items in the slideshow the same way it would for any view.

On mine I have a field that is "order" and then the slides are set to filter based on that number.

sylvaticus’s picture

hello, sorry I didn't got your answer.
I don't want to filter returning only one slide, but having all the slides "starting" with a particular one (e.g. the 3rd). Is that somehow possible?

jsimonis’s picture

Sorry, I meant to say sort, not filter. Filter got stuck in my head because you'd mentioned it.

Sort is what I use - it allows me to choose how the slides are ordered.

sylvaticus’s picture

Thank you again jsimonis. However my need is not to set a CCK field in the node to use it as as sort order. I already did that. But is to call the view in a way that I have the slideshow starting from e.g. what it would be (without any parameter) slide 3. But at this point I just don't think it it possible, hehe.. thank you any how..

jsimonis’s picture

Without any parameters set you're just going to get whatever it is that Drupal uses as the default sorting. Otherwise you're going to have to add some kind of sort of your own.

It doesn't necessarily have to be a cck field. I use one because we wanted the site editors to specifically be able to order the slideshow. By having a cck integer field, editors can specify which is first, second, third, etc.

You could also use information already in the node, such as the posted date and then go in and manually change the slideshow item's posted date so that it would be in the order you want it to be.

sylvaticus’s picture

I am very sorry, it seems I can't explain it :-|

I need and I already have a cck field to act as a "sort" field. However I would like to be able to call the view with a parameter that let the view to start from a specific slide. Think to it as an offset. This would allow me to easily do some nice things, e.g. build my "own" pager, putting titles or any other field..

jsimonis’s picture

What kind of field is that and what data is in it?

Having a field like that is exactly what I do. Mine's just an integer and I set the one I want to be first as "1" and then set a sort in the view based on that number. That way if I want slide 5 to be the first one, I set it as "1".

Geijutsuka’s picture

This worked in the Drupal 7 version; I'm not sure the settings are as robust in Drupal 6 version... but here goes:

If you want your slides in a particular order, but you want the slideshow to initialize with a particular slide active, you need to go to the section called "jQuery Cycle Custom Options" under the slideshow settings. (Note: if you don't have these options, you need to download json2.js from https://github.com/douglascrockford/JSON-js and put it in your sites/all/libraries/json2 folder). In that section, select "startingSlide" and set the Advanced Option Value to the number of the wanted starting slide (the numbering starts with 0, not 1).

Hope that helps.

redndahead’s picture

Title: Is it possible to set the initial slide using filters? » Add a hook to manipulate the settings before they are processed
Version: 6.x-2.3 » 7.x-3.x-dev
Category: support » feature

Same answer as #8 for version 2. That said it doesn't give you the effect of letting a field or something else tell you what is the starting value. For that you can probably write some code that looks for that value and then tells the slideshow to start with it. I'm not sure how it would be handled in views slideshow though. Field would be weird and I can't quite grab anything else. Maybe I can add a hook to manipulate the settings before it's passed to the processor. But new features are 3.x only.

nickdickinsonwilde’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

You should be able to alter the settings via HOOK_js_alter()