I'm trying to theme the jCarousel, but I'm having a hard time getting it the way I want. I decided to strip the view template files from all unneeded tags, so I went to the views theme information and this is what i saw:
Style output: viewscarousel-view.tpl.php (File not found, in folder sites/all/modules/viewscarousel/),
Is there supposed to be a template file like that? It is not in the package I downloaded.
Thanks in advance!
Comments
Comment #1
robloachClear your theme cache?
Comment #2
libeco commentedDid that, I also have
drupal_rebuild_theme_registry();in my template.php while doing local work on the theme.
I have never looked at the code of a views plugin before, but when I looked at viewscarousel.views.inc I saw this line:
'theme' => 'viewscarousel_view',I temporarily commented it out and saw the error was gone, there were no names for the template suggestions though so it really seems like the file viewscarousel-view.tpl.php is missing from the module package. (It just is not there.)
Thanks in advance!
Comment #3
friolator commentedI just noticed this today as well... exactly the same error.
Comment #4
bengtan commentedThere is definitely some sort of bug here.
The file viewscarousel-view.tpl.php used to exist in this module (see http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/viewscarous...), but then it got removed as part of the commit for http://drupal.org/cvs?commit=193996, yet Views still asks for it in 'Theme: Information'.
Comment #5
bengtan commentedOn the other hand, this is what views_theme() generates for hook_theme() on behalf of viewscarousel.module:
This declaration is for a theme('viewscarousel_view', ...) type function, not one based on template (ie .tpl.php) files.
So, one diagnosis is that Views correctly understands that there isn't a viewscarousel-view.tpl.php file, yet the "Theme: Information" link in views editing is incorrectly attempting to find it.
My opinion is that this is a small bug in Views, but I'm happy to be corrected by others.
Comment #6
bredi commentedsame here. my theming of a view stopped working today and I get this error too.
subscribe
Comment #7
dgastudio commentedso any solution?
Comment #8
selinav commentedHello,
I've donwloaded the tpl.php but the carousel doesn't work with it.
I wish to insert class in the li. How can I do it?
Comment #9
pschopf commentedselinav: You can put a custom version of views-view-fields.tpl.php file in your theme directory. This template formats all the content that goes inside each
Then you can simply wrap the entire output in '
Comment #10
selinav commentedThanks for your reply. I've success to add the class, but the problem come from the carousel. Problem with FF, the ul generated is too short of 1px, the last image goes on the next line.
Comment #11
AdrianB commentedUsing Views carousel 6.x-2.x-dev (2009-Nov-06) I get this error as well. Cleared cache but the error is still there.
The file viewscarousel-view.tpl.php does exist in 6.x-1.x-dev but not in 6.x-2.x-dev.
Comment #12
quicksketchThis is because Views makes the assumption that all theming is done in template files. In the 2.x version, viewscarousel-view.tpl.php does not exist but there is a theme_viewscarousel_view() function in the module file, which takes the place of the file. The View Carousel handler CAN implement the theme_functions() method in its views handler and specify a different theme function name, which might be a good idea. That would prevent Views from looking for the normal locations. Either that or it could implement hook_theme_registry_alter() and remove the template registration that is added by Views.
Either way, it's a cosmetic problem and it doesn't actually affect the use of the module.
Comment #13
clemens.tolboomMaybe a bug report into the views project would help novice users. And it saves some more comments on this one :)
Not sure how to report this myself.
Comment #14
andrew.eatherington@gmail.com commentedJust got this error yesterday. Carousel fell apart all of a sudden.
Views reports missing viewscarousel-view.tpl.php.
Removed module and re-installed - still the same.
Checked the style options in views and see the custom css path is not available any more
Comment #15
traviscarden commentedSubscribing.
Comment #16
zoraxsubcribing.
I get the file views-view-fields.tpl.php from the view module.
I just raname it according to the view style information here is the warning :
warning: Invalid argument supplied for foreach() in D:\Almede_studio\wamp\www\test\sites\default\themes\escapades\viewscarousel-view--agenda--block.tpl.php on line 22.
Comment #17
stevegmag commentedI can get the override working by placing viewscarousel-view.tpl.php in my theme directory. However, I need to have several carousels available, each with a different override tpl file. How should these be named to get them to pull based on the view being used?
viewscarousel-view-view1.tpl.php
viewscarousel-view-view2.tpl.php
I've tried every combination I can think of...
thanks in advance.
sg
Comment #18
stevegmag commentedSorry didn't mean to change the thread title.
Comment #19
anni commentedIt works with viewscarousel-view--myView.tpl.php
Comment #20
anni commented