Dynamic Default Tab via URL OR User Token / Role

Created on 12 March 2015, almost 10 years ago
Updated 16 December 2024, 2 days ago

I'll admit this right now, I'm a Drupal newbie - and I've been assigned a massive project and an unchangeable deadline.

Using Quicktabs, I have the following needs, and I've found some documentation for this, but what I've seen probably won't help me. Here goes:

I'll be using standard sets of Quicktabs to represent 4 different types of content on various pages on our site. The individual tabs will always be named the same and displayed in the same order, but they'll show different content on different pages - the tabs represent our 4 different campuses here at ASU.

Scenario One - Tokens / Roles
When students are logged in to the site via CAS, I'd like to default the Quicktab that is loaded and selected on various pages that have these sets of 4 Quicktabs, based on the value of a current-user Token or possibly their Role (based on campus). This will enable the student to have a consistent "campus" view when they encounter pages that have campus-specific content displayed via the tabs, assuming they are logged-into the site.

Scenario Two - URL Parameter
Also, for users who are not logged-into the site, I'd like to be able to set a default tab to load and display based on a URL parameter. I've seen some info on this, but it doesn't seem quite finished or reliable. Again, it is functionality I would have to deploy on many different sets of Quicktabs, and I need to know how to apply it "universally".

If anyone can give me some advice on how to implement this, that would be greatly helpful. If not, we may have to hire an outside developer to help us customize this and make it work. Also, if perhaps there is a better way to do this, that would be great. We have settled on using tabs, so that isn't going to change, but if there is something built into Quicktabs already to handle this that I don't know of, please let me know on that as well.

Many thanks,

--Joe

πŸ’¬ Support request
Status

Closed: outdated

Version

3.0

Component

User interface

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    With D7 EOL approaching in a month I'm starting to triage the D7 side of quicktabs queue.

    If still an issue or needed for 4.0.x (latest branch) feel free to reopen

Production build 0.71.5 2024