The module is good. I need to theme a couple of different views-rotator views differently. I need to theme the actual output of views-rotator, depending on the view in question.
Should I just put an "if" statement in the file views-views-rotator.tpl.php to check the view name, or are there some advanced theming options like in the views module (eg. create file views-views-rotator-myview1.tpl.php)?
Comments
Comment #1
mfer commentedThere is a lot you can do with theming. It follows the views conventions.
Is it the items (rows) that you need to theme or the views rotator wrapper? If you just need to theme the rows it should be like theming rows elsewhere in views 2 and doesn't have an impact on view rotator. If you need to theme the rotator grad the .tpl.php file included with the module, copy it to your theme, rename it to add the view name properly to the end, and make your modification. Only do this if you need to alter the rotator and not the rows that feed the rotator.
You might, also, want to override the theme function.
Comment #2
fletchgqc commentedThanks for that. I'm playing around and what I've noticed is that if I do what you have instructed, but do not actually change the contents of the file at all, the slideshow no longer works.
I'm changing this to a bug report because I consider it a bug - implementing a default file in your theme without changing it should not change the behaviour of the module (in my opinion). I can't really start theming until the behaviour stabilises in that point.
At least... I think that's what's happening. Maybe you can verify. Follow your own instructions above except the bit about making a modification and see if the output changes...
Comment #3
mfer commentedDo you have an example of a changed .tpl.php file? I'd need to see your custom file to try and find the problem.
Comment #4
fletchgqc commentedDon't need to change it. Try the following to find the problem:
Comment #5
mfer commentedI did what you spelled out here and the only change I saw between the two pages generated output was the ?A at the end of the css and js files was changed to ?B. This difference has nothing to do with views rotator. Was there something else you were seeing? Some specific difference.
Comment #6
fletchgqc commentedHmmm... I think I had a copy of a theming file accidently stuck in some other folder which was taking effect. Or something like that. Anyway it's working now on a clean installation - sorry for the hassle.