Closed (fixed)
Project:
Slider
Version:
6.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2008 at 23:21 UTC
Updated:
30 Dec 2008 at 15:30 UTC
Greetings
Thanks for great the great module. I was wondering if you had considered applying individual classes for every li. I notice it automatically applies first and last classes, but I think there's some utility to being able to theme every individual li.
Thanks for your time and consideration.
Comments
Comment #1
Mark Theunissen commentedHi jimi089
You can use Drupal's theme layer to change any part of the slider. Just create a themename_preprocess_slider() function in your template.php. Then you will probably want to override the $vars['tabs_formatted'] variable. Change this line:
As you can see, at the moment it uses the base theme_item_list to create the list. You can substitute this for anything you like really, as long as it meets the basic requirements of being a list with the class "slidenav".
Hope that helps
Mark
Comment #2
notarealperson commentedThanks very much for your help and guidance!
Comment #3
Mark Theunissen commentedNo problem. Here's the handbook page in case you want some more guidance...
http://drupal.org/node/223430
Comment #4
asak commentedI still don't get it.
I'de like to get a unique ID/class for every li - so that i could theme them seperatly.
How could the solution mentioned help with this...? :-/
Thanks!
Comment #5
Mark Theunissen commentedWell, instead of returning a theme('item_list'), you'd write your own function that gives each li it's own class. Or you'd make a new array out of vars['tabs'] with class attributes.
http://api.drupal.org/api/function/theme_item_list
If I have time, I will see if I can do this, but it's unlikely to be done in the near future. Will keep this thread updated.
Comment #6
Mark Theunissen commentedFixed in 6.x-1.2 by adding the following to the preprocess function: