Hi,
with views you can select under Theme Information the custom template file. I've copied the original views-slideshow.tpl.php
to my custom views-slideshow--featured--pane-featured.tpl.php
It works after you flush the cache. But only once. If you refresh the page (F5), then you get these errors:
Notice: Undefined variable: skin in include() (line 16 of C:\Inetpub\wwwroot\123.com\sites\all\themes\andalusiah\templates\views-slideshow--featured--pane-featured.tpl.php). =>
> Notice: Undefined variable: slideshow in include() (line 24 of C:\Inetpub\wwwroot\123.com\sites\all\themes\andalusiah\templates\views-slideshow--featured--pane-featured.tpl.php). =>
The problem is that $skin and $template are no longer available in the custom tpl file. If you refresh caches one more time, again it works. But again only once - after you refresh the page again, same errors appear.
I'm showing this view as a content page within panels, but issue does not seem related to panels. It probably points to a tpl file caching issue.
Comment | File | Size | Author |
---|---|---|---|
#6 | 1173910-d7-1.patch | 10.97 KB | redndahead |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI found a strange solution: copied the function
template_preprocess_views_slideshow
to my template.php ("mytheme_preprocess_views_slideshow"). Then the problem went away.This shouldn't be necessary, should it? Why would it work after the first page-load, but not after that?
Comment #2
jpstrikesback CreditAttribution: jpstrikesback commentedI can confirm this whacky behaviour and the temp fix
Comment #3
kruser CreditAttribution: kruser commentedsubscribing. same issue here.
Comment #4
redndahead CreditAttribution: redndahead commentedThis may be a views issue. Views is what creates the theme function for that. Not sure what it may be on my side.
Comment #5
redndahead CreditAttribution: redndahead commentedApparently drupal cannot handle preprocess files in theme.inc files. I'm working on it. Pretty much have to move the preprocesses to the .module file.
Comment #6
redndahead CreditAttribution: redndahead commentedThis patch was committed.
Comment #8
youngelpaso CreditAttribution: youngelpaso commentedredndahead, where did you find the information about the theme.inc vs .module file?
Comment #9
redndahead CreditAttribution: redndahead commentedI think crell told me in irc.