Needs work
Project:
Ajax Slideshow
Version:
6.x-2.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2010 at 14:59 UTC
Updated:
17 Jun 2010 at 05:49 UTC
It would be great if we could choose which slide to start with on load, and determine it based on variables. So let's say my content has a datefield, and I want the one that matches today's datefield to be the main page with previous and next day options to see the last/upcoming days, this option would provide so.
Comments
Comment #1
udig commentedHi whatsnewsisyphus,
Good idea. I would like to bring this feature in.
Here's a hint on how to make the module support this feature.
On the ajax_slideshow.js file after line 108, add the following line:
initialIndex:Drupal.settings.ajax_slideshow.initialIndex,Now open the ajax_slideshow.module file and go to line 211. This is where the js variables are being set so you may add here the following variable:
initialIndex => $requiredIndex,Where $requiredIndex is the index of the node you want to appear first (you may calculate it using a special function).
In addition to the above you need to disable the preloading - go to the ajax slideshow configuration page and turn-off the relevant check box under the advanced settings section.
The above is bad solution in terms of backward compatibility as it breaks the module code but if you need this behavior go for it.
It would be awesome if you can write a patch which generalizes this feature so I can bring it into the module on the next release.
Good luck.
Comment #2
arpieb commentedI'm new to AJAX Slideshow, but it seems that you could leverage a couple other modules without hacking the code... Couldn't you do the following?
Am I oversimplifying this solution...? I'm actually playing with Draggable Views to allow a client to reorder slides using the "order" field assigned by that module as part of my view sort criteria, and so far it appears to be working...
Comment #3
udig commentedGreat idea.
Thanks arpieb
Comment #4
udig commented