Hi,

Thanks for the great module and sorry for the really trivial question, but I have been unable to theme the 'previous' and 'next' links using CSS.

Using '.ssc-previous' and '.ssc-next' makes no changes.

Thank you in advance for any help on this.

Comments

HS’s picture

When I use Firebug to examine the 'Previous' and 'Next' links in this link, which is the page linked in this module's project page under 'Try a demonstration', I see the following:

<a class="Array active" id="ssc-previous-13152fa51" href="/grounded/carpetpython">Previous</a>

How would I theme this using CSS?

Using the class selector '.ssc-previous-13152fa51' is not an option because that won't apply to all slideshows, correct?

rhouse’s picture

Status: Active » Needs work

Hi, there is currently no 'sensible' class name assigned to these elements in the generated slideshow. Having inherited this module from its original creator, I don't know why the class Array is in there, and the other one is, I think, needed for the javascript jquery cycle to work. You cannot use the id name because that is generated on the fly to provide a unique id for each slideshow. It is not guaranteed to stay the same.

I think your question is actually an enhancement request. When I get some time I'll see what I can do.

HS’s picture

Thanks for the reply. Would you be kind enough to give me instructions on how I can assign classes for these elements. I don't mind hacking the mod for now in order to be able to use it, but don't know where to start.

HS’s picture

Title: How to theme ssc-previous and ssc-next using CSS? » Navigation links require CSS classes to theme
Anonymous’s picture

I think I've found the problem.
The drupal 7 version works perfectly, because the l() function expects an array of class names when creating the link. See https://api.drupal.org/api/drupal/includes!common.inc/function/l/7, option 'attributes'.
The same function in drupal 6 seems to expect a string for classes and slideshow_creator.inc passes an array: this is why class names are shown as "Array".
I do not have a drupal6 installed to test this theory but IMHO, classes should be given as (for drupal6 only):
'class' => 'ssc-previous',
instead of
'class' => array('ssc-previous'),
in function _theme_slideshow_creator_nextprevious(). The same applies to 'ssc-next'.

rhouse’s picture

Status: Needs work » Fixed

Yes monnerat, you have found the problem. It didn't dawn on me until I saw your reply that this was not a feature request but was actually a bug report that only applied to the D6 version. Your change, and a corresponding change to ssc-next a few lines further on, fixes the problem. It must be time to release the next version!

NB: You have to empty the cache to see the fix, even if you have caching turned off!

Status: Fixed » Closed (fixed)

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

suncorjohn’s picture

Has the new version been released?