i want to embed a view that uses this plugin on my frontpage. Therefore i embedded the view in page.tpl.php like this

 if($is_front){
print views_embed_view('frontpage_teaser','embed','');
} 

But its not working. The items are all shown as regular list-items with no transitions :(

If i embed it in my node.tpl.php the same way, its working fine. So: i saw that its not loading the needed javascripts in the footer when embedded in page.tpl.php. Anyone knows how i can solve this? Does it makes a difference if i create a frontpage-template-file and embed it there?

Thanks in advance
Fab

Comments

Crell’s picture

Status: Active » Fixed

That's because the preprocess functions for views_cycle queue up additional JS and CSS that's needed for views_cycle to work. If you're in the page template, though, the page's CSS and JS header elements have already been processed and created so the new ones from views_cycle won't get added.

You really shouldn't be calling a view like that in the first place. It's very likely to break in creative ways. If you want arbitrary positioning like that, embedding the view into a page created with the Panels module is going to be a more sustainable approach.

Status: Fixed » Closed (fixed)

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

wavesailor’s picture

Issue tags: +jQuery, +not working, +views slideshow, +views_embed_view

Another solution using jQuery is explained here:
http://drupal.org/node/823056#comment-4580448

burningdog’s picture

Cool, nice fix @wavesailor :) You could also use drupal_add_js() to add that code in a module - I guess you could do it in the theme too.