Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I suggest to split current huge theme function theme_field_slideshow() into more specific theme functions or even use template file for theming. Currently, any small customization requires creating the copy of the whole theme_field_slideshow() function.
Comments
Comment #1
jdanthinne CreditAttribution: jdanthinne commentedHi,
I've just pushed changes to the DEV version.
The module is now using a template file (it took me some time because it's the first time I do that).
Please try next DEV release and tell me what you think of it…
Comment #2
Steven Jones CreditAttribution: Steven Jones commentedThis is great, but it would be ever more helpful if you were to split the preprocess function into a process function too. I'll work on a patch.
Comment #3
Steven Jones CreditAttribution: Steven Jones commentedActually, I'm probably not going to have time to work on this sorry, but actually I think you can just change a lot of the calls to the theme function in the preprocessor into render arrays, and then use the
render
function in the template file, and then people will be able to modify the image cleanly if they need to.Comment #4
jdanthinne CreditAttribution: jdanthinne commented@Steven Jones : I'm not used to use the new render function. Do you have a nice url with tutorial on that?
Comment #5
Steven Jones CreditAttribution: Steven Jones commentedNot that I can think of, sorry! Maybe the Examples project has something?
Comment #6
jdanthinne CreditAttribution: jdanthinne commentedI've just ordered the Drupal 7 Module Development last week, there should be something about that in it :-)