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.
What's the best approach for implementing the carousel? A view or a page? During site planning I had the carousel working on a static copy of the design but after creating the theme I just can't get it to work. A little how to would be most appreciated.
Comments
Comment #1
anydigital CreditAttribution: anydigital commentedHm. Carousel functionality is built-in ;) Just create some blocks and place them inside "Featured" region.
Region is used as carousel container and blocks are used as carousel items.
Comment #2
cruno CreditAttribution: cruno commentedIs there any built in functionality for having a background image for the carousel blocks?
Comment #3
anydigital CreditAttribution: anydigital commentedNot yet. But definitely will be!
Comment #4
semei CreditAttribution: semei commentedAlso, it seems linke the carousel animation doesn't kick off itself. Once you klick to the left or right, the carousel keeps on spinning at a certain time interval. But if you do not click on one of the arrows to 'ignite' the animation, then the carousel will not spin. Is this by design?
Comment #5
francoud CreditAttribution: francoud commentedI solved #4 adding a script in the bottom of the page - I edited html.tpl.php, I guess you could also edit page.tpl.php instead.
Put this script before the closing
!function ($) { $(function(){ $('#carousel').carousel({interval: 8000}) }) }(window.jQuery)</body>
tag:You can customize the "interval" value (8000 should be 8 secs) or remove it completely. For me, it works with bootstrap 2.3.2 - the carousel automatically starts.
See also: http://stackoverflow.com/questions/18359074/twitter-bootstrap-carousel-d...