Active
Project:
Views Display Tabs
Version:
6.x-1.0-beta6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2010 at 12:01 UTC
Updated:
9 Jul 2015 at 17:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
solipsist commentedSure. I'd welcome a patch.
Comment #2
hixster commentedAny news on this?
Comment #3
cyborg_572 commentedI was working on this for a website, and added a system that uses a cookie to track what tab was last selected. In loads the correct tab first in PHP, renewing the cookie each time as well. The javascript checks for the cookie and lets that take precedence over the default setting coming from the views module. The javascript also sets the cookie whenever the tab is switched.
Each view has it's own cookie named "vdtMemory-[view name]" and stores the name of the display to show, so there's no conflict with having this enabled on multiple views. It uses the default values for domain, path and security, but the expiration date is customizable on a per-view basis. All of this can be turned on or off on a per-view basis in the viewsdisplaytabs settings.
I'm going to have to apologize though, as I'm fairly new to Drupal, so I might not be using the greatest coding standards. I'm also still learning how to make a good patch, so I'm uploading the .module and the .js file. I started with the 6.x-1.0-beta6 files.
I hope this is helpful.
Comment #4
chrislabeard commentedI would love to have this feature. I've tried your upload, yes it remembers the tab but it seems it won't load the actual view just displays the default.
Comment #5
cyborg_572 commentedyeah... I just recently noticed that too. I guess that's what I get for testing on a set of views that look very similar.
Comment #6
karengrey commentedsetting a cookie is not best practice because:
There's a new EU law that has come into effect, that websites that require cookies now have to ask users to opt in to use them, rather than the old way of opting out.
Its best to set a variable into the $_SESSION that stores the active tab. Im working on this at the moment, but would be nice if it was there anyway like other exposed filters on views are.
Comment #7
cyborg_572 commentedSession is generally tracked via cookies as well, isn't it?
EDIT: Never mind, I did some looking and I guess there's implications that session cookies are allowed, if I understand properly. It was some quick looking around.
Comment #8
hellomobe commentedHow do we implement the $_SESSION for the view - mentioned in #6.
Comment #9
abaanda commentedanyone got this to work for the d7 port?