I want to create a slideshow in the front page. the slide show must have banner image of particular content type of recent nodes. how should i achieve this? should i create a view and theme it?

  • should i create a view and theme it? yes, that's the quickest & easiest route.
    – No Sssweat
    Nov 29, 2017 at 6:31
  • Do you mean you've got content type X with a banner field in it and you want a slideshow of recent nodes of type X based on their banners? Nov 29, 2017 at 8:21
  • yes. I dont have much coding knowledge. if I need to write a views tpl what should the content be? how do i implement it? Nov 29, 2017 at 10:31

2 Answers 2



you can use very options:

  1. Create view with the slider content and theming tpls adding slick.js fe. as block or node to display only in frontpage
  2. Add carousel module (there are many modules..carousel bootstrap, flexslider...) and create new view of this type with the slider content as block and display this block in frontpage .

Regards, Iván.

  • I have to do only with theme templates not with any extra module. there is a html(index.html) given to me. I dont know how do i output the data(feild_banner_image of content type x) into the html. Please help. Nov 29, 2017 at 10:33
  • I have already created the view? what should be done next? Nov 29, 2017 at 11:32
  • First step: To create new view with field_banner_image to add in slide as Block drupal.org/node/1578374 Second step: Theming the new view created on step 1 api.drupal.org/api/views/theme%21theme.inc/group/… Third step: Add js for slide kenwheeler.github.io/slick -Extra: drupal.org/node/304255 Fourth step: Publish the block view on frontpage go to ?q=admin/build/block, you can configure your blocks to display on certain pages (it looks you already know this). In that list you can put <front> to signify the front page. Nov 29, 2017 at 11:33

Thankfully i found a soution and here's what I did. I was given the HTML of the carousal. 1. I made a view in the drupal admin panel. 2. Format as table and feild and disable all the default classes. 3.select one of style output in themeing information on the bottom left of the admin view. 4. Make a tpl. 5. Put the HTML in for each(for the divs/ classes which repeat) loop. And the divs which don't repeat put them out of for each loop.

You will get the slideshow if the CSS and JavaScript are included properly and the divs and classes are put properly in the views tpl file :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.