SlideShare a Scribd company logo
1 of 19
Introduction to Drupal 7

                               Session 4.1
                           Making the slideshow



Drupalist: Kalin Chernev        Course by Init Lab (http://initlab.org)   1
Agenda
•    Slideshows
•    How can we make it in a nice way
•    Setting up the image styles
•    Setting up the content type
•    Setting up the views
•    Creating a feature from your work



Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   2
Slideshows
• Frequently wanted feature from clients
• Can have different effects, sizes and designs
• Main idea is to cycle a certain number of
  images in a nice way
• In the past, flash was frequently used,
  nowadays, only javascript or jquery is used for
  better performance and many other reasons


Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   3
The good slideshow we can offer
• We are good website builders, we’ll make:
       – Slideshow with nice fading effect
       – Slides will be manageable as normal content
       – Slides will have order number for the sorting
       – Slideshow will have configuration options for
         advanced users
       – Slideshow will be using only configurations, so
         that work can be modified by other Drupalists


Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   4
What do we need to make it happen
•    Image style for fixed dimensions of the images
•    Content type with fields for the slides;
•    Views plugin to implement jQuery effects;
•    Views view block holding the configurations;




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   5
Setting up the image style
• As the slideshow images are quite specific in
  size, we’ll create a new preset for it
• Let’s say that the dimensions will be strictly
  915px by 400px, any above will be cut
• Go to admin/config/media/image-styles
• Create new preset “slideshow” and use the
  scale and crop effect to restrict dimensions
  after trying to resize the image

Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   6
The image style is ready




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   7
Creating the content type
• We want a separate content type in order to
  let the website content administrator manage
  the slideshows in an easy way
• Fields are simple:
       – Title (which is mandatory and in anyway)
       – Image (taking the image for the slideshow)
       – URL (link to go to a specific page if available)
       – Order (number which will be used in the sorting)

Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   8
The image field
• Create a new field for the slideshow content
  type image, do not re-use current images (why
  is that?)
• Only 1 image per node should be possible
• The field should be required
• Enable the alt and title fields input for better
  SEO meta descriptions on the image objects


Drupalist: Kalin Chernev     Course by Init Lab (http://initlab.org)   9
The URL field
• Can be a regular text field, even though there
  is a Link module for advanced link creations
• The field should not be required, the user
  should have the choice to fill it in or not
• If the field is filled in, then the given image is
  linked to somewhere
• If the field is empty, then the image does not
  link to anywhere
• Only 1 value per node should be possible
Drupalist: Kalin Chernev    Course by Init Lab (http://initlab.org)   10
Order field
• The field is used to control the order of display
  of slideshow images in the slider
• The order will be implemented from the Views
• The order field should be an integer value
  (why?)
• The field may not be required
• Only 1 value per node should be possible


Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   11
Tweakings
• You can do some things to make the content type
  better for administrators
       – Remove the body field from the content type – we
         don’t‘ really need this one in this case
       – Manage the displays better
              •   The image does not need label
              •   The image can use the slideshow image preset
              •   The image link can have label inline
              •   The order field can either be hidden or put inline too
• By the way, you can upload some content now 
Drupalist: Kalin Chernev         Course by Init Lab (http://initlab.org)   12
Making the views slideshow
• Download and install
       – Views Slideshow
       – Libraries API
       – The jQuery Cycle plugin (install in /sites/all/libraries)
• Enable Views Slideshow and Views Slideshow:
  Cycle modules (which require Libraries API)
• Go and create a new view block
  (admin/structure/views/add)
• Use the slideshow formatter option

Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   13
Creating the slideshow view




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   14
Slideshow views configurations




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   15
Slideshow ready




Drupalist: Kalin Chernev      Course by Init Lab (http://initlab.org)   16
Creating the slideshow feature
• The slideshow view
• The image style
• The content type




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   17
Time for questions




Drupalist: Kalin Chernev       Course by Init Lab (http://initlab.org)   18
Contacts
Kalin Chernev
       – E: kalata@shtrak.eu
       – T: twitter.com/kalinchernev
       – U: http://shtrak.eu/kalata




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   19

More Related Content

What's hot

Anatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeAnatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress Theme
Julie Kuehl
 
Preventing Drupal Headaches: Content Type Checklist
Preventing Drupal Headaches: Content Type ChecklistPreventing Drupal Headaches: Content Type Checklist
Preventing Drupal Headaches: Content Type Checklist
Acquia
 
Drupal content editor flexibility
Drupal content editor flexibilityDrupal content editor flexibility
Drupal content editor flexibility
hernanibf
 
The things we found in your website
The things we found in your websiteThe things we found in your website
The things we found in your website
hernanibf
 

What's hot (20)

Responsive Web Design using ZURB Foundation
Responsive Web Design using ZURB FoundationResponsive Web Design using ZURB Foundation
Responsive Web Design using ZURB Foundation
 
Anatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeAnatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress Theme
 
Drupal - Blocks vs Context vs Panels
Drupal - Blocks vs Context vs PanelsDrupal - Blocks vs Context vs Panels
Drupal - Blocks vs Context vs Panels
 
Using Features
Using FeaturesUsing Features
Using Features
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
 
Getting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationGetting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundation
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal project
 
44 Slides About 22 Modules
44 Slides About 22 Modules44 Slides About 22 Modules
44 Slides About 22 Modules
 
Media handling in Drupal (Drupalcamp Leuven 2013)
Media handling in Drupal (Drupalcamp Leuven 2013)Media handling in Drupal (Drupalcamp Leuven 2013)
Media handling in Drupal (Drupalcamp Leuven 2013)
 
Creating Web Templates for SharePoint 2010
Creating Web Templates for SharePoint 2010Creating Web Templates for SharePoint 2010
Creating Web Templates for SharePoint 2010
 
Zurb foundation
Zurb foundationZurb foundation
Zurb foundation
 
Preventing Drupal Headaches: Content Type Checklist
Preventing Drupal Headaches: Content Type ChecklistPreventing Drupal Headaches: Content Type Checklist
Preventing Drupal Headaches: Content Type Checklist
 
Simplifying End-user Drupal 7 Content Administration
Simplifying End-user Drupal 7 Content Administration Simplifying End-user Drupal 7 Content Administration
Simplifying End-user Drupal 7 Content Administration
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
 
Introduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience ToolkitIntroduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience Toolkit
 
Drupal
DrupalDrupal
Drupal
 
Introduction to Drupal 7 - Basic Functionalities and Content management
Introduction to Drupal 7 - Basic Functionalities and Content managementIntroduction to Drupal 7 - Basic Functionalities and Content management
Introduction to Drupal 7 - Basic Functionalities and Content management
 
Drupal content editor flexibility
Drupal content editor flexibilityDrupal content editor flexibility
Drupal content editor flexibility
 
Creating a Drupal Install Profile for a Large Organization
Creating a Drupal Install Profile for a Large OrganizationCreating a Drupal Install Profile for a Large Organization
Creating a Drupal Install Profile for a Large Organization
 
The things we found in your website
The things we found in your websiteThe things we found in your website
The things we found in your website
 

Similar to Introduction to Drupal 7 - Making a slideshow with Views 3

Similar to Introduction to Drupal 7 - Making a slideshow with Views 3 (20)

Introduction to Drupal 7 - Panels
Introduction to Drupal 7 - PanelsIntroduction to Drupal 7 - Panels
Introduction to Drupal 7 - Panels
 
Introduction to Drupal 7 - Getting Drupal up and running
Introduction to Drupal 7 - Getting Drupal up and runningIntroduction to Drupal 7 - Getting Drupal up and running
Introduction to Drupal 7 - Getting Drupal up and running
 
Introduction to Drupal 7 - Performance optimization
Introduction to Drupal 7 - Performance optimizationIntroduction to Drupal 7 - Performance optimization
Introduction to Drupal 7 - Performance optimization
 
Introduction to Drupal 7 - SEO
Introduction to Drupal 7 - SEOIntroduction to Drupal 7 - SEO
Introduction to Drupal 7 - SEO
 
Introduction to Drupal 7 - Content types and fields
Introduction to Drupal 7 - Content types and fieldsIntroduction to Drupal 7 - Content types and fields
Introduction to Drupal 7 - Content types and fields
 
Introduction to Drupal 7 - Image Styles
Introduction to Drupal 7 - Image StylesIntroduction to Drupal 7 - Image Styles
Introduction to Drupal 7 - Image Styles
 
Introduction to Drupal 7 News section and home page block with views
Introduction to Drupal 7  News section and home page block with viewsIntroduction to Drupal 7  News section and home page block with views
Introduction to Drupal 7 News section and home page block with views
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
 
Panopoly - Boulder DBUG 13 Nov 2013
Panopoly - Boulder DBUG 13 Nov 2013Panopoly - Boulder DBUG 13 Nov 2013
Panopoly - Boulder DBUG 13 Nov 2013
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
 
Introduction to Drupal 7 - Homework - making team section
Introduction to Drupal 7 - Homework - making team sectionIntroduction to Drupal 7 - Homework - making team section
Introduction to Drupal 7 - Homework - making team section
 
Automated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchAutomated Acceptance Testing from Scratch
Automated Acceptance Testing from Scratch
 
Tpr1
Tpr1Tpr1
Tpr1
 
Drupal 8 Deep Dive: Plugin System
Drupal 8 Deep Dive: Plugin SystemDrupal 8 Deep Dive: Plugin System
Drupal 8 Deep Dive: Plugin System
 
Drupal 8 theming deep dive
Drupal 8 theming deep diveDrupal 8 theming deep dive
Drupal 8 theming deep dive
 
Mad scientist-roadshow
Mad scientist-roadshowMad scientist-roadshow
Mad scientist-roadshow
 
Diwd 2011-111011223430-phpapp01
Diwd 2011-111011223430-phpapp01Diwd 2011-111011223430-phpapp01
Diwd 2011-111011223430-phpapp01
 
BackboneJS
BackboneJSBackboneJS
BackboneJS
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)
 
Introduction to Drupal 7 Users and roles management
Introduction to Drupal 7 Users and roles managementIntroduction to Drupal 7 Users and roles management
Introduction to Drupal 7 Users and roles management
 

More from Kalin Chernev

Drupal course-plovdiv-week1-day-1
Drupal course-plovdiv-week1-day-1Drupal course-plovdiv-week1-day-1
Drupal course-plovdiv-week1-day-1
Kalin Chernev
 
Курс по Drupal - лекция 3
Курс по Drupal - лекция 3Курс по Drupal - лекция 3
Курс по Drupal - лекция 3
Kalin Chernev
 

More from Kalin Chernev (18)

Style guides in drupal development workflows
Style guides in drupal development workflowsStyle guides in drupal development workflows
Style guides in drupal development workflows
 
RESTful with Drupal - in-s and out-s
RESTful with Drupal - in-s and out-sRESTful with Drupal - in-s and out-s
RESTful with Drupal - in-s and out-s
 
Trainings and education at hackerspaces
Trainings and education at hackerspacesTrainings and education at hackerspaces
Trainings and education at hackerspaces
 
Introduction to Frontend Development - Session 2 - CSS Fundamentals
Introduction to Frontend Development - Session 2 - CSS FundamentalsIntroduction to Frontend Development - Session 2 - CSS Fundamentals
Introduction to Frontend Development - Session 2 - CSS Fundamentals
 
Introduction to Frontend Development - Session 1 - HTML Fundamentals
Introduction to Frontend Development - Session 1 - HTML FundamentalsIntroduction to Frontend Development - Session 1 - HTML Fundamentals
Introduction to Frontend Development - Session 1 - HTML Fundamentals
 
SEO Fundamentals Outline Lecture 2
SEO Fundamentals Outline Lecture 2SEO Fundamentals Outline Lecture 2
SEO Fundamentals Outline Lecture 2
 
Search Engine Optimization Fundamentals
Search Engine Optimization FundamentalsSearch Engine Optimization Fundamentals
Search Engine Optimization Fundamentals
 
Hackerspaces in Bulgaria Lecture VarnaConf 2012
Hackerspaces in Bulgaria Lecture VarnaConf 2012Hackerspaces in Bulgaria Lecture VarnaConf 2012
Hackerspaces in Bulgaria Lecture VarnaConf 2012
 
Introduction to Drupal 7 - Updating core, themes and modules. applying patches
Introduction to Drupal 7 - Updating core, themes and modules. applying patchesIntroduction to Drupal 7 - Updating core, themes and modules. applying patches
Introduction to Drupal 7 - Updating core, themes and modules. applying patches
 
Introduction to Drupal 7 - Homework - webforms on webforms
Introduction to Drupal 7 - Homework - webforms on webformsIntroduction to Drupal 7 - Homework - webforms on webforms
Introduction to Drupal 7 - Homework - webforms on webforms
 
Introduction to Drupal 7 - Webforms
Introduction to Drupal 7 - WebformsIntroduction to Drupal 7 - Webforms
Introduction to Drupal 7 - Webforms
 
Introduction to Drupal 7 - Installing and configuring WYSIWYG editors in Drupal
Introduction to Drupal 7 - Installing and configuring WYSIWYG editors in DrupalIntroduction to Drupal 7 - Installing and configuring WYSIWYG editors in Drupal
Introduction to Drupal 7 - Installing and configuring WYSIWYG editors in Drupal
 
Introduction to Drupal 7 - Homework on making latest news slideshow block
Introduction to Drupal 7 - Homework on making latest news slideshow blockIntroduction to Drupal 7 - Homework on making latest news slideshow block
Introduction to Drupal 7 - Homework on making latest news slideshow block
 
Introduction to Drupal 7 - Taxonomy Categorization - Homework included
Introduction to Drupal 7 - Taxonomy Categorization - Homework includedIntroduction to Drupal 7 - Taxonomy Categorization - Homework included
Introduction to Drupal 7 - Taxonomy Categorization - Homework included
 
Business education
Business educationBusiness education
Business education
 
Drupal course-plovdiv-week1-day-1
Drupal course-plovdiv-week1-day-1Drupal course-plovdiv-week1-day-1
Drupal course-plovdiv-week1-day-1
 
Drupal-курс-лекция-6
Drupal-курс-лекция-6Drupal-курс-лекция-6
Drupal-курс-лекция-6
 
Курс по Drupal - лекция 3
Курс по Drupal - лекция 3Курс по Drupal - лекция 3
Курс по Drupal - лекция 3
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Introduction to Drupal 7 - Making a slideshow with Views 3

  • 1. Introduction to Drupal 7 Session 4.1 Making the slideshow Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 1
  • 2. Agenda • Slideshows • How can we make it in a nice way • Setting up the image styles • Setting up the content type • Setting up the views • Creating a feature from your work Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 2
  • 3. Slideshows • Frequently wanted feature from clients • Can have different effects, sizes and designs • Main idea is to cycle a certain number of images in a nice way • In the past, flash was frequently used, nowadays, only javascript or jquery is used for better performance and many other reasons Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 3
  • 4. The good slideshow we can offer • We are good website builders, we’ll make: – Slideshow with nice fading effect – Slides will be manageable as normal content – Slides will have order number for the sorting – Slideshow will have configuration options for advanced users – Slideshow will be using only configurations, so that work can be modified by other Drupalists Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 4
  • 5. What do we need to make it happen • Image style for fixed dimensions of the images • Content type with fields for the slides; • Views plugin to implement jQuery effects; • Views view block holding the configurations; Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 5
  • 6. Setting up the image style • As the slideshow images are quite specific in size, we’ll create a new preset for it • Let’s say that the dimensions will be strictly 915px by 400px, any above will be cut • Go to admin/config/media/image-styles • Create new preset “slideshow” and use the scale and crop effect to restrict dimensions after trying to resize the image Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 6
  • 7. The image style is ready Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 7
  • 8. Creating the content type • We want a separate content type in order to let the website content administrator manage the slideshows in an easy way • Fields are simple: – Title (which is mandatory and in anyway) – Image (taking the image for the slideshow) – URL (link to go to a specific page if available) – Order (number which will be used in the sorting) Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 8
  • 9. The image field • Create a new field for the slideshow content type image, do not re-use current images (why is that?) • Only 1 image per node should be possible • The field should be required • Enable the alt and title fields input for better SEO meta descriptions on the image objects Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 9
  • 10. The URL field • Can be a regular text field, even though there is a Link module for advanced link creations • The field should not be required, the user should have the choice to fill it in or not • If the field is filled in, then the given image is linked to somewhere • If the field is empty, then the image does not link to anywhere • Only 1 value per node should be possible Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 10
  • 11. Order field • The field is used to control the order of display of slideshow images in the slider • The order will be implemented from the Views • The order field should be an integer value (why?) • The field may not be required • Only 1 value per node should be possible Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 11
  • 12. Tweakings • You can do some things to make the content type better for administrators – Remove the body field from the content type – we don’t‘ really need this one in this case – Manage the displays better • The image does not need label • The image can use the slideshow image preset • The image link can have label inline • The order field can either be hidden or put inline too • By the way, you can upload some content now  Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 12
  • 13. Making the views slideshow • Download and install – Views Slideshow – Libraries API – The jQuery Cycle plugin (install in /sites/all/libraries) • Enable Views Slideshow and Views Slideshow: Cycle modules (which require Libraries API) • Go and create a new view block (admin/structure/views/add) • Use the slideshow formatter option Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 13
  • 14. Creating the slideshow view Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 14
  • 15. Slideshow views configurations Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 15
  • 16. Slideshow ready Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 16
  • 17. Creating the slideshow feature • The slideshow view • The image style • The content type Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 17
  • 18. Time for questions Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 18
  • 19. Contacts Kalin Chernev – E: kalata@shtrak.eu – T: twitter.com/kalinchernev – U: http://shtrak.eu/kalata Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 19