Active
Project:
Views carousel
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2010 at 20:45 UTC
Updated:
21 Dec 2010 at 01:15 UTC
I wasn't sure whether to label this feature request or support.
Is there a way to have carousel remember where a user was in the carousel and give them that display? I have a carousel which is persistent across pages, but it annoyingly returns to the beginning of the carousel when the user selects a node. This is working as intended, of course, because the user is at a new node so carousel reloads from the beginning as it should. I'm just wondering whether we can do something to get it to remember where someone was (which nodes were in display last) and have it display that with perhaps an expiration timer of half an hour?
Comments
Comment #1
melchoir55 commentedOne-week bump. Anyone else need this? Done it before and know how? Please let me know!
Comment #2
melchoir55 commentedI found a website that explains how to do this with jcarousel. However, I am unclear on where to put this code. It depends on another jquery plugin called "cookie". I'm also unclear where to put that.
The URL for the "remember where I was" plugin http://blog.devonlinux.net/2009/10/10/remember-jcarousel-position/
URL for cookie jquery plugin http://plugins.jquery.com/files/jquery.cookie.js.txt
Comment #3
melchoir55 commentedI think this could actually be accomplished by just including the above two files as javascript includes in your page header, then calling the value of the cookie. The only problem is that identical views are used across multiple users so we need some way of getting the code to create (and call) a unique cookie based on the author of a node.
Does anyone else want this functionality? I'd really appreciate some help working on this.
Comment #4
becca08 commentedYeah I am looking for this functionality too but would have no idea how to do it. I noticed that Views Slideshow now has a 'remember position' function so it must be do-able. Anyone out there code savvy enough to help?
Comment #5
snevins commentedI too need this functionality and I've got 2 carousels on the same page so I need a way to have a unique cookie for each if the cookie method mentioned in #2 is what's used.
Comment #6
snevins commentedI gave up on trying to implement this with cookies. As I stated earlier, I have 2 jcarousels on the same page. I have a gallery of artworks, and each artwork can have multiple images. So one jcarousel displayed the "representative" image for each artwork in that gallery and the other displays the thumbs for each image there is of that artwork.
So, when I clicked on a thumbnail in either carousel I just needed the div with id content-area (I'm using a zen sub-theme) to update with my new node.
Caveat: I know this isn't the most elegant way to do this.
So, I looked at the page source to see what the id's were of my jcarousel blocks they were block-views-80c64b74107e8232a21756d5cb814251 and block-views-daef3e4e63c80382a3872d137859c920. So, in my page-imageartwork.tpl.php, just below
print $scripts;I added the following java script to hijack the link associated with the thumbnail that had been clicked on and load the #content-area div of that link into the current #content-area div.So in the code below, just replace the #block-views-blah with your jcarousel's block id, and replace content-area with the appropriate id - and if you only have 1 carousel, then you can delete the
Comment #7
snevins commentedWell, the above was close for me. The problem for me is that I actually need the artwork carousel to reload with new images when an image is selected from the gallery carousel, and right now it isn't.