I created a fieldgroup with Horizontal Tabs, and it works awesome. But I'm wondering if there's a way to insert a unique CSS Class or ID to each "tab button". I'm attaching a screenshot of the code that is being rendered. YOu can see that each of the "horizontal-tab-list" items has the same CSS Class, except for the 1st and last items have that added class. But I'd like a unique CSS class or ID for each item, if possible?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bryancasler’s picture

subscribe

Stalski’s picture

Status: Active » Needs work

Certainly possible. this will be included in next iteration.

minneapolisdan’s picture

Thanks for the quick reply, I appreciate it.

Stalski’s picture

Status: Needs work » Fixed

Fixed and pushed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

lhugg’s picture

Version: 7.x-1.0 » 7.x-1.3
Issue summary: View changes
Status: Closed (fixed) » Active

This fix does not seem to work in versions 7.x-1.1 thru 1.x-1.3. The fields are there to be added, but do not render in the code.

mel-miller’s picture

Also does not work on latest Dev snapshot (7.x-1.3+5-dev).
ID works, but not class.

bechtold’s picture

FileSize
22.74 KB

I think this works as needed. There are unique classes. (i'm not sure what the status should be set to)
See my screenshot in the red box.

If you want the group names like in the green box look here: https://drupal.org/node/2172645

nils.destoop’s picture

Title: Add Unique CSS Class or ID to each Tab Button » Add Unique CSS Class or ID to each Tab
Status: Active » Closed (works as designed)

This works ok. The classes / ids are set on the fieldsets, never on the li's.

fietserwin’s picture

The classes are unique but not predictable, as "#access" restrictions might change the index of a given group/button in the tab list. Therefore, @bechtold's idea in #2172645: group_name as class in tab buttons (add semantic classes based on group name) is better. Please go over there and review if you agree.

gettysburger’s picture

Has this been resolved? I am using 7.x-1.5 and am not able to add an ID to a Horizontal Tab, just a Horizontal Tab Group. Thanks.