SlideShare une entreprise Scribd logo
1  sur  72
Télécharger pour lire hors ligne
V
Engr.Ranel O.Padon
Drupal Apprentice Training
https://github.com/ranelpadon
UNLIMITED
IEWS
TOPICS
Introduction
Views Components
Formats
Fields
Basic Filters, Exposed Filters, Contextual Filters
Relationships
Attachment
Display Formats: Map, Chart, Slideshow,Data Export
Recommendations
About Me
Full-time Drupal developer for CNN Travel
Part-time Python/Web GIS lecturer in UP.
Involved in computational Java and Python projects before.
Plays competitive football and futsal.
INTRODUCTION
“Views changed my life.”
~Michelle Lauer and Greg Stout
INTRODUCTION
The No.1 module out of 27,000+ modules.
INTRODUCTION
Earl Miles: the Views creator.
Drupal.org: @merlinofchaos
INTRODUCTION
INTRODUCTION
Views is a module that displays a list of data.
One set of data could have many Views. #flexibility
Under the Hood
Under the Hood
Under the Hood
Under the Hood
Views Demystified
Views is essentially a view of data.
For example, if you’re in a bar with your friend (which could be drunk
already), and suddenly a woman entered the room your friend may find
the woman gorgeous/sexy,but you might find it just mediocre/ugly.
Views Demystified
In that case, there are 2 different Views or perspective: your View and
your friend’s View; while the data (the Woman) is the same for both of
you, it could be portrayed differently.
Views Demystified
In the same way,Views retrieve data from the database, selects the
content types you want (Blog, News, Product,Tourist Spot), the
fields you want (Title, Images,Author,Location, Price), filter them
(filter by category,filter by price), apply some pre-processing
(compute total, aggregate data), sort them (sort by surname, sort by
area, sort by publication date), and finally display them in a format you
want (list, grid, charts, maps, gallery).
Views Demystified
Hence, a same pool of data could be combined and viewed in many
ways.This makes Drupal really powerful!
Views Demystified
Views is the make or break of Drupal. Many people find it to be
intimidating and hard. But essentially,it just answers these 3 questions:
What?
Where?
How?
Views Demystified
What (Content Type, Fields)
Where (Page, Block,Attachment)
How (List,Table, Gallery,Chart, Map)
Views: Let's Get Our Hands Dirty!
Enable: Chaos Tools,Views, and Views UI modules
Create 3 Articles (fill-in their Title, Body,and Tags fields)
Views: SIMPLE LIST
Views: SIMPLE LIST
Views: SIMPLE LIST
Views: SIMPLE LIST | DISPLAY
Edit View.
Set Display to HTML List.
Save View.
Edit View.
Set Display to Grid and Table.
Utilize the Views' Preview section.
Utilizing the “?” help/hint icons
- if the Advanced Help module is installed
Views: SIMPLE LIST | SORTING
Remove the Post Date sorter.
Add Title Sorter,Set to Ascending.
Check Preview.
Views: SIMPLE LIST | FIELDS
Change Display's Contents to Fields.
Add fields.
Rearrange fields.
Remove fields.
Trim Fields (trim the Body field to 20 characters only).
Views: SIMPLE LIST | EXPOSED FILTERS
Add exposed filter (filter by Tags)
Enable AJAX (to avoid page reloading)
Views: PATH, PERMISSION, PAGERS
Edit Path.
Add Menu Link.
Control the Permission.
Add a Footer message.
Paged Output
Full vs Mini Pager
Exposed Pager
Views: SIMPLE LIST | BLOCK VIEW
Add a new View in the current View
Set the Display Name
Display the view in Block.
'All Displays' vs 'This Block (Override)'
Show Titles Only
Enable the Block
Show that Block in that page only.
Views: SIMPLE LIST | PAGE CLONING
Clone a Page
Set the Display Name
Display All contents (don't set the edit to All Displays!)
Edit Path (/articles-full)
Connect the Block to the new Page
Set the More Link (Display 2 contents only) in the Block
Advanced >> Link Display: check Full Articles Page
Views: CLONING | TABBED MENUS
Clone the Articles Views in admin/structure/views
Set the Page View's Path as /articles-parent
Clone the parent Page, Re-order Views Displays
Set Path as /articles-parent/tab1
Menu Settings:
Title:Tab 1
Type: Default Menu Tab
Parent Menu Item: Normal Menu Item
Menu: Main Menu
Views: CLONING | TABBED MENUS
Views: CLONING | TABBED MENUS
Go to the other Page Display
Set Path as /articles-parent/tab2
Menu Settings:
Title:Tab 2
Type: Menu Tab
Menu: Main Menu
Weight: 1
Views: CLONING | TABBED MENUS
For easier and more powerful tabbing needs,
See the Quick Tabs module:
https://www.drupal.org/project/quicktabs
Views: Destination with Reviews
Relationships between Tourist Spot and Review content types.
The Review's table has been merged to the Tourist Spot's table to
connect and retrieve information.
Views: Relationships
For merging information across tables. In SQL, it's the JOIN operation.
Usually used if you want to access deeper information from two or
more content types, including users or taxonomy terms' comprehensive
object/table information.
Activate these modules for this exercise:
Entity API
Entity Reference
Inline Entity Form
Views: Relationships
Create Review content type
Title field: Byline
Reviewer:Text
Rating: List (Integer)
Create Tourist Spot content type
Destination Name:Text
Review: Entity Reference
Widget: Inline Entity Form
Views: Relationships
Create Review content type
Views: Relationships
Create Tourist Spot content type
Views: Relationships
*Create 3 Tourist Spots
1.Tourist Spot:
Name:Amanpulo Beach Resort
Review:
Byline: Excellent Service!!
Reviewer: Juday
Rating: 5
Views: Relationships
*Create 3 Tourist Spots
2.Tourist Spot:
Name:Taal Volcano
Review:
Byline: Good View
Reviewer: PNoy
Rating: 4
Views: Relationships
*Create 3 Tourist Spots
3.Tourist Spot:
Name: Chocolate Hills
Review:
Byline: Disappointed!
Reviewer: Mommy D
Rating: 2
Views: Relationships
Create new View
Views: Relationships
Add the Relationships
Views: Relationships
Adjust the Fields
Views: Contextual Filters
Usually used for creating related contents/block/info for each individual
page.
Views: Contextual Filters
Add a new Block display,then set the Nid as a contextual filter
(Arguments in Drupal 6)
Views: Map Display
We need fields for holding
location information.
These field will be used by Views
for displaying contents in a map.
Views: Map Display
Activate Modules:
Libraries
GeoPHP,Geofield
Leaflet, Leaflet Views, Leaflet More Maps
Put the "leaflet" JS library in sites/all/libraries,
so that you will have site/all/libraries/leaflet/leaflet.js file
Views: Map Display
Add an Island Group Taxonomy Vocabulary,then add the Luzon,
Visayas, and Mindanao terms.
Views: Map Display
Add Location field and Island Group field in Tourist Spot
Views: Map Display
Edit each Tourist Spot, and specify the values:
Amanpulo Beach Resort
Latitude: 11
Longitude: 121
Island Group: Luzon
Views: Map Display
Edit each Tourist Spot, and specify the values:
Taal Volcano
Latitude: 14
Longitude: 121
Island Group: Luzon
Views: Map Display
Edit each Tourist Spot, and specify the values:
Chocolate Hills
Latitude: 9.8
Longitude: 124.2
Island Group:Visayas
Views: Map Display
Add Location field and Island Group field in Tourist Spot
Views: OpenLayers
Implement a similar view using the OpenLayers module.
https://www.drupal.org/project/openlayers
Follow this guideline:
https://www.drupal.org/node/1481374
For a comprehensive discussion of mapping with Drupal:
http://www.slideshare.net/ranelpadon/of-nodes-and-maps
Views: Chart Display
We need a charting library
to visualize Views data.
Charts utilizes the
Views' Aggregation
and Count operations.
Views: Chart Display
Activate Modules:
Libraries
Visualization
Put the "highcharts" JS library in sites/all/libraries,
so that you will have site/all/libraries/highcharts/js/highcharts.js file
Views: Chart Display
Views: Google Chart Tools
Implement a similar view using the Views Chart Tools module.
https://www.drupal.org/project/views_chart_tools
Follow this guideline:
https://www.drupal.org/node/1675788
Views: Slideshow Display
We need an slideshow plugin for
cycling the contents/fields
Views: Slideshow Display
Activate Modules:
Libraries
Views Slideshow,Views Slideshow Cycle
Put the "jquery.cycle" JS library in sites/all/libraries,
so that you will have a
site/all/libraries/jquery.cycle/jquery.cycle.all.min.js
Views: Slideshow Display
Add a Photos field, then upload the 3 sample photos provided for each
Tourist Spot.
Views: Slideshow Display
Views: Flex Slider
Try also the responsive and nifty FlexSlider module:
https://www.drupal.org/project/flexslider
Views: Export Data as csv, xls, etc
Activate Module:
Views Data Export
Views: Export Data as csv, xls, etc
Essential idea:
1. Set the Display Format to XLS, CSV,etc.
2. Set the export Path.
3. Set the view that it will be attached to.
Views: Export Data as csv, xls, etc
Exercise: Highlighted Content
Create a new Block display in the left sidebar.The first content should
display its Title and Photo, the rest, display their Titles only.
Challenge Exercise:
OpenLayers with
Exposed Filters
What's More?
1.Views PDF
2. Entity Views Attachment (EVA)
3. Nodequeue
4. EFQ Views
5.Views Accelerator
6. and so on (explore Views-related modules in Drupal.org)
“Views changed my life..”
“..and it is about to change yours.”

Contenu connexe

En vedette

LVEE 2014: Text parsing with Python and PLY
LVEE 2014: Text parsing with Python and PLYLVEE 2014: Text parsing with Python and PLY
LVEE 2014: Text parsing with Python and PLYdmbaturin
 
PyCon PH 2014 - GeoComputation
PyCon PH 2014 - GeoComputationPyCon PH 2014 - GeoComputation
PyCon PH 2014 - GeoComputationRanel Padon
 
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...David Beazley (Dabeaz LLC)
 
WAD : A Module for Converting Fatal Extension Errors into Python Exceptions
WAD : A Module for Converting Fatal Extension Errors into Python ExceptionsWAD : A Module for Converting Fatal Extension Errors into Python Exceptions
WAD : A Module for Converting Fatal Extension Errors into Python ExceptionsDavid Beazley (Dabeaz LLC)
 
CKEditor Widgets with Drupal
CKEditor Widgets with DrupalCKEditor Widgets with Drupal
CKEditor Widgets with DrupalRanel Padon
 
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++David Beazley (Dabeaz LLC)
 
Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0David Beazley (Dabeaz LLC)
 
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...David Beazley (Dabeaz LLC)
 
Python Programming - X. Exception Handling and Assertions
Python Programming - X. Exception Handling and AssertionsPython Programming - X. Exception Handling and Assertions
Python Programming - X. Exception Handling and AssertionsRanel Padon
 
Python for text processing
Python for text processingPython for text processing
Python for text processingXiang Li
 
Python Programming - VII. Customizing Classes and Operator Overloading
Python Programming - VII. Customizing Classes and Operator OverloadingPython Programming - VII. Customizing Classes and Operator Overloading
Python Programming - VII. Customizing Classes and Operator OverloadingRanel Padon
 
Python Programming - III. Controlling the Flow
Python Programming - III. Controlling the FlowPython Programming - III. Controlling the Flow
Python Programming - III. Controlling the FlowRanel Padon
 
The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)
The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)
The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)Ranel Padon
 
Python Programming - IX. On Randomness
Python Programming - IX. On RandomnessPython Programming - IX. On Randomness
Python Programming - IX. On RandomnessRanel Padon
 
Switchable Map APIs with Drupal
Switchable Map APIs with DrupalSwitchable Map APIs with Drupal
Switchable Map APIs with DrupalRanel Padon
 
Python Programming - VIII. Inheritance and Polymorphism
Python Programming - VIII. Inheritance and PolymorphismPython Programming - VIII. Inheritance and Polymorphism
Python Programming - VIII. Inheritance and PolymorphismRanel Padon
 

En vedette (20)

LVEE 2014: Text parsing with Python and PLY
LVEE 2014: Text parsing with Python and PLYLVEE 2014: Text parsing with Python and PLY
LVEE 2014: Text parsing with Python and PLY
 
Text analysis using python
Text analysis using pythonText analysis using python
Text analysis using python
 
PyCon PH 2014 - GeoComputation
PyCon PH 2014 - GeoComputationPyCon PH 2014 - GeoComputation
PyCon PH 2014 - GeoComputation
 
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
 
Generator Tricks for Systems Programmers
Generator Tricks for Systems ProgrammersGenerator Tricks for Systems Programmers
Generator Tricks for Systems Programmers
 
WAD : A Module for Converting Fatal Extension Errors into Python Exceptions
WAD : A Module for Converting Fatal Extension Errors into Python ExceptionsWAD : A Module for Converting Fatal Extension Errors into Python Exceptions
WAD : A Module for Converting Fatal Extension Errors into Python Exceptions
 
Understanding the Python GIL
Understanding the Python GILUnderstanding the Python GIL
Understanding the Python GIL
 
CKEditor Widgets with Drupal
CKEditor Widgets with DrupalCKEditor Widgets with Drupal
CKEditor Widgets with Drupal
 
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++
SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++
 
Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0
 
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
Why Extension Programmers Should Stop Worrying About Parsing and Start Thinki...
 
Python introduction
Python introductionPython introduction
Python introduction
 
Python Programming - X. Exception Handling and Assertions
Python Programming - X. Exception Handling and AssertionsPython Programming - X. Exception Handling and Assertions
Python Programming - X. Exception Handling and Assertions
 
Python for text processing
Python for text processingPython for text processing
Python for text processing
 
Python Programming - VII. Customizing Classes and Operator Overloading
Python Programming - VII. Customizing Classes and Operator OverloadingPython Programming - VII. Customizing Classes and Operator Overloading
Python Programming - VII. Customizing Classes and Operator Overloading
 
Python Programming - III. Controlling the Flow
Python Programming - III. Controlling the FlowPython Programming - III. Controlling the Flow
Python Programming - III. Controlling the Flow
 
The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)
The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)
The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)
 
Python Programming - IX. On Randomness
Python Programming - IX. On RandomnessPython Programming - IX. On Randomness
Python Programming - IX. On Randomness
 
Switchable Map APIs with Drupal
Switchable Map APIs with DrupalSwitchable Map APIs with Drupal
Switchable Map APIs with Drupal
 
Python Programming - VIII. Inheritance and Polymorphism
Python Programming - VIII. Inheritance and PolymorphismPython Programming - VIII. Inheritance and Polymorphism
Python Programming - VIII. Inheritance and Polymorphism
 

Similaire à Views Unlimited: Unleashing the Power of Drupal's Views Module

Demo Guidebook 040110
Demo Guidebook 040110Demo Guidebook 040110
Demo Guidebook 040110Brad Ganas
 
Getting Started with Drupal
Getting Started with DrupalGetting Started with Drupal
Getting Started with DrupalRachel Vacek
 
User experience and interactions design
User experience and interactions design User experience and interactions design
User experience and interactions design Rakesh Jha
 
SPS Stockholm: PowerApps Jumpstart
SPS Stockholm: PowerApps JumpstartSPS Stockholm: PowerApps Jumpstart
SPS Stockholm: PowerApps JumpstartSandy Ussia
 
Rss on your_library_site
Rss on your_library_siteRss on your_library_site
Rss on your_library_sitepeacekaat
 
Getting into ember.js
Getting into ember.jsGetting into ember.js
Getting into ember.jsreybango
 
Master UX from design to prototype
Master UX from design to prototypeMaster UX from design to prototype
Master UX from design to prototypeSalvatore Iaconesi
 
3) web development
3) web development3) web development
3) web developmenttechbed
 
Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
 Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg... Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...Brian Mann
 
Metamorphosis from Forms to Java: A technical lead's perspective, part II
Metamorphosis from Forms to Java:  A technical lead's perspective, part IIMetamorphosis from Forms to Java:  A technical lead's perspective, part II
Metamorphosis from Forms to Java: A technical lead's perspective, part IIMichael Fons
 
Getting Started with Drupal
Getting Started with DrupalGetting Started with Drupal
Getting Started with DrupalNina McHale
 
Getting Started with Drupal
Getting Started with DrupalGetting Started with Drupal
Getting Started with DrupalRachel Vacek
 
Meetup: The big change coming to WordPress in 2018 - Gutenberg
Meetup: The big change coming to WordPress in 2018 - GutenbergMeetup: The big change coming to WordPress in 2018 - Gutenberg
Meetup: The big change coming to WordPress in 2018 - GutenbergEvan Mullins
 
Meetup: The big change coming to WordPress in 2018 - Gutenberg
Meetup: The big change coming to WordPress in 2018 - GutenbergMeetup: The big change coming to WordPress in 2018 - Gutenberg
Meetup: The big change coming to WordPress in 2018 - GutenbergMickey Mellen
 
Designing well known websites with ADF Rich Faces
Designing well known websites with ADF Rich FacesDesigning well known websites with ADF Rich Faces
Designing well known websites with ADF Rich Facesmaikorocha
 
Drupal Views development
Drupal Views developmentDrupal Views development
Drupal Views developmentOSInet
 

Similaire à Views Unlimited: Unleashing the Power of Drupal's Views Module (20)

Views
ViewsViews
Views
 
Demo Guidebook 040110
Demo Guidebook 040110Demo Guidebook 040110
Demo Guidebook 040110
 
Getting Started with Drupal
Getting Started with DrupalGetting Started with Drupal
Getting Started with Drupal
 
User experience and interactions design
User experience and interactions design User experience and interactions design
User experience and interactions design
 
SPS Stockholm: PowerApps Jumpstart
SPS Stockholm: PowerApps JumpstartSPS Stockholm: PowerApps Jumpstart
SPS Stockholm: PowerApps Jumpstart
 
Rss on your_library_site
Rss on your_library_siteRss on your_library_site
Rss on your_library_site
 
Getting into ember.js
Getting into ember.jsGetting into ember.js
Getting into ember.js
 
Master UX from design to prototype
Master UX from design to prototypeMaster UX from design to prototype
Master UX from design to prototype
 
3) web development
3) web development3) web development
3) web development
 
Ui5con blr fe
Ui5con blr feUi5con blr fe
Ui5con blr fe
 
Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
 Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg... Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...
 
Metamorphosis from Forms to Java: A technical lead's perspective, part II
Metamorphosis from Forms to Java:  A technical lead's perspective, part IIMetamorphosis from Forms to Java:  A technical lead's perspective, part II
Metamorphosis from Forms to Java: A technical lead's perspective, part II
 
Getting Started with Drupal
Getting Started with DrupalGetting Started with Drupal
Getting Started with Drupal
 
Getting Started with Drupal
Getting Started with DrupalGetting Started with Drupal
Getting Started with Drupal
 
Meetup: The big change coming to WordPress in 2018 - Gutenberg
Meetup: The big change coming to WordPress in 2018 - GutenbergMeetup: The big change coming to WordPress in 2018 - Gutenberg
Meetup: The big change coming to WordPress in 2018 - Gutenberg
 
Meetup: The big change coming to WordPress in 2018 - Gutenberg
Meetup: The big change coming to WordPress in 2018 - GutenbergMeetup: The big change coming to WordPress in 2018 - Gutenberg
Meetup: The big change coming to WordPress in 2018 - Gutenberg
 
Designing well known websites with ADF Rich Faces
Designing well known websites with ADF Rich FacesDesigning well known websites with ADF Rich Faces
Designing well known websites with ADF Rich Faces
 
Drupal Views development
Drupal Views developmentDrupal Views development
Drupal Views development
 
Routing
RoutingRouting
Routing
 
Lab2-android
Lab2-androidLab2-android
Lab2-android
 

Plus de Ranel Padon

Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)Ranel Padon
 
Python Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingPython Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingRanel Padon
 
Python Programming - XII. File Processing
Python Programming - XII. File ProcessingPython Programming - XII. File Processing
Python Programming - XII. File ProcessingRanel Padon
 
Python Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsPython Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsRanel Padon
 
Python Programming - VI. Classes and Objects
Python Programming - VI. Classes and ObjectsPython Programming - VI. Classes and Objects
Python Programming - VI. Classes and ObjectsRanel Padon
 
Python Programming - V. Sequences (List and Tuples) and Dictionaries
Python Programming - V. Sequences (List and Tuples) and DictionariesPython Programming - V. Sequences (List and Tuples) and Dictionaries
Python Programming - V. Sequences (List and Tuples) and DictionariesRanel Padon
 
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...Ranel Padon
 
Python Programming - II. The Basics
Python Programming - II. The BasicsPython Programming - II. The Basics
Python Programming - II. The BasicsRanel Padon
 
Python Programming - I. Introduction
Python Programming - I. IntroductionPython Programming - I. Introduction
Python Programming - I. IntroductionRanel Padon
 
Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)Ranel Padon
 
Web Mapping with Drupal
Web Mapping with DrupalWeb Mapping with Drupal
Web Mapping with DrupalRanel Padon
 

Plus de Ranel Padon (11)

Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
 
Python Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingPython Programming - XIII. GUI Programming
Python Programming - XIII. GUI Programming
 
Python Programming - XII. File Processing
Python Programming - XII. File ProcessingPython Programming - XII. File Processing
Python Programming - XII. File Processing
 
Python Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular ExpressionsPython Programming - XI. String Manipulation and Regular Expressions
Python Programming - XI. String Manipulation and Regular Expressions
 
Python Programming - VI. Classes and Objects
Python Programming - VI. Classes and ObjectsPython Programming - VI. Classes and Objects
Python Programming - VI. Classes and Objects
 
Python Programming - V. Sequences (List and Tuples) and Dictionaries
Python Programming - V. Sequences (List and Tuples) and DictionariesPython Programming - V. Sequences (List and Tuples) and Dictionaries
Python Programming - V. Sequences (List and Tuples) and Dictionaries
 
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
Python Programming - IV. Program Components (Functions, Classes, Modules, Pac...
 
Python Programming - II. The Basics
Python Programming - II. The BasicsPython Programming - II. The Basics
Python Programming - II. The Basics
 
Python Programming - I. Introduction
Python Programming - I. IntroductionPython Programming - I. Introduction
Python Programming - I. Introduction
 
Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)
 
Web Mapping with Drupal
Web Mapping with DrupalWeb Mapping with Drupal
Web Mapping with Drupal
 

Dernier

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 

Dernier (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Views Unlimited: Unleashing the Power of Drupal's Views Module

  • 1. V Engr.Ranel O.Padon Drupal Apprentice Training https://github.com/ranelpadon UNLIMITED IEWS
  • 2. TOPICS Introduction Views Components Formats Fields Basic Filters, Exposed Filters, Contextual Filters Relationships Attachment Display Formats: Map, Chart, Slideshow,Data Export Recommendations
  • 3. About Me Full-time Drupal developer for CNN Travel Part-time Python/Web GIS lecturer in UP. Involved in computational Java and Python projects before. Plays competitive football and futsal.
  • 4. INTRODUCTION “Views changed my life.” ~Michelle Lauer and Greg Stout
  • 5. INTRODUCTION The No.1 module out of 27,000+ modules.
  • 6. INTRODUCTION Earl Miles: the Views creator. Drupal.org: @merlinofchaos
  • 8. INTRODUCTION Views is a module that displays a list of data. One set of data could have many Views. #flexibility
  • 13. Views Demystified Views is essentially a view of data. For example, if you’re in a bar with your friend (which could be drunk already), and suddenly a woman entered the room your friend may find the woman gorgeous/sexy,but you might find it just mediocre/ugly.
  • 14. Views Demystified In that case, there are 2 different Views or perspective: your View and your friend’s View; while the data (the Woman) is the same for both of you, it could be portrayed differently.
  • 15. Views Demystified In the same way,Views retrieve data from the database, selects the content types you want (Blog, News, Product,Tourist Spot), the fields you want (Title, Images,Author,Location, Price), filter them (filter by category,filter by price), apply some pre-processing (compute total, aggregate data), sort them (sort by surname, sort by area, sort by publication date), and finally display them in a format you want (list, grid, charts, maps, gallery).
  • 16. Views Demystified Hence, a same pool of data could be combined and viewed in many ways.This makes Drupal really powerful!
  • 17. Views Demystified Views is the make or break of Drupal. Many people find it to be intimidating and hard. But essentially,it just answers these 3 questions: What? Where? How?
  • 18. Views Demystified What (Content Type, Fields) Where (Page, Block,Attachment) How (List,Table, Gallery,Chart, Map)
  • 19. Views: Let's Get Our Hands Dirty! Enable: Chaos Tools,Views, and Views UI modules Create 3 Articles (fill-in their Title, Body,and Tags fields)
  • 23. Views: SIMPLE LIST | DISPLAY Edit View. Set Display to HTML List. Save View. Edit View. Set Display to Grid and Table. Utilize the Views' Preview section. Utilizing the “?” help/hint icons - if the Advanced Help module is installed
  • 24. Views: SIMPLE LIST | SORTING Remove the Post Date sorter. Add Title Sorter,Set to Ascending. Check Preview.
  • 25. Views: SIMPLE LIST | FIELDS Change Display's Contents to Fields. Add fields. Rearrange fields. Remove fields. Trim Fields (trim the Body field to 20 characters only).
  • 26. Views: SIMPLE LIST | EXPOSED FILTERS Add exposed filter (filter by Tags) Enable AJAX (to avoid page reloading)
  • 27. Views: PATH, PERMISSION, PAGERS Edit Path. Add Menu Link. Control the Permission. Add a Footer message. Paged Output Full vs Mini Pager Exposed Pager
  • 28. Views: SIMPLE LIST | BLOCK VIEW Add a new View in the current View Set the Display Name Display the view in Block. 'All Displays' vs 'This Block (Override)' Show Titles Only Enable the Block Show that Block in that page only.
  • 29. Views: SIMPLE LIST | PAGE CLONING Clone a Page Set the Display Name Display All contents (don't set the edit to All Displays!) Edit Path (/articles-full) Connect the Block to the new Page Set the More Link (Display 2 contents only) in the Block Advanced >> Link Display: check Full Articles Page
  • 30. Views: CLONING | TABBED MENUS Clone the Articles Views in admin/structure/views Set the Page View's Path as /articles-parent Clone the parent Page, Re-order Views Displays Set Path as /articles-parent/tab1 Menu Settings: Title:Tab 1 Type: Default Menu Tab Parent Menu Item: Normal Menu Item Menu: Main Menu
  • 31. Views: CLONING | TABBED MENUS
  • 32. Views: CLONING | TABBED MENUS Go to the other Page Display Set Path as /articles-parent/tab2 Menu Settings: Title:Tab 2 Type: Menu Tab Menu: Main Menu Weight: 1
  • 33. Views: CLONING | TABBED MENUS For easier and more powerful tabbing needs, See the Quick Tabs module: https://www.drupal.org/project/quicktabs
  • 34. Views: Destination with Reviews Relationships between Tourist Spot and Review content types. The Review's table has been merged to the Tourist Spot's table to connect and retrieve information.
  • 35. Views: Relationships For merging information across tables. In SQL, it's the JOIN operation. Usually used if you want to access deeper information from two or more content types, including users or taxonomy terms' comprehensive object/table information. Activate these modules for this exercise: Entity API Entity Reference Inline Entity Form
  • 36. Views: Relationships Create Review content type Title field: Byline Reviewer:Text Rating: List (Integer) Create Tourist Spot content type Destination Name:Text Review: Entity Reference Widget: Inline Entity Form
  • 39. Views: Relationships *Create 3 Tourist Spots 1.Tourist Spot: Name:Amanpulo Beach Resort Review: Byline: Excellent Service!! Reviewer: Juday Rating: 5
  • 40. Views: Relationships *Create 3 Tourist Spots 2.Tourist Spot: Name:Taal Volcano Review: Byline: Good View Reviewer: PNoy Rating: 4
  • 41. Views: Relationships *Create 3 Tourist Spots 3.Tourist Spot: Name: Chocolate Hills Review: Byline: Disappointed! Reviewer: Mommy D Rating: 2
  • 45. Views: Contextual Filters Usually used for creating related contents/block/info for each individual page.
  • 46. Views: Contextual Filters Add a new Block display,then set the Nid as a contextual filter (Arguments in Drupal 6)
  • 47. Views: Map Display We need fields for holding location information. These field will be used by Views for displaying contents in a map.
  • 48. Views: Map Display Activate Modules: Libraries GeoPHP,Geofield Leaflet, Leaflet Views, Leaflet More Maps Put the "leaflet" JS library in sites/all/libraries, so that you will have site/all/libraries/leaflet/leaflet.js file
  • 49. Views: Map Display Add an Island Group Taxonomy Vocabulary,then add the Luzon, Visayas, and Mindanao terms.
  • 50. Views: Map Display Add Location field and Island Group field in Tourist Spot
  • 51. Views: Map Display Edit each Tourist Spot, and specify the values: Amanpulo Beach Resort Latitude: 11 Longitude: 121 Island Group: Luzon
  • 52. Views: Map Display Edit each Tourist Spot, and specify the values: Taal Volcano Latitude: 14 Longitude: 121 Island Group: Luzon
  • 53. Views: Map Display Edit each Tourist Spot, and specify the values: Chocolate Hills Latitude: 9.8 Longitude: 124.2 Island Group:Visayas
  • 54. Views: Map Display Add Location field and Island Group field in Tourist Spot
  • 55. Views: OpenLayers Implement a similar view using the OpenLayers module. https://www.drupal.org/project/openlayers Follow this guideline: https://www.drupal.org/node/1481374 For a comprehensive discussion of mapping with Drupal: http://www.slideshare.net/ranelpadon/of-nodes-and-maps
  • 56. Views: Chart Display We need a charting library to visualize Views data. Charts utilizes the Views' Aggregation and Count operations.
  • 57. Views: Chart Display Activate Modules: Libraries Visualization Put the "highcharts" JS library in sites/all/libraries, so that you will have site/all/libraries/highcharts/js/highcharts.js file
  • 59. Views: Google Chart Tools Implement a similar view using the Views Chart Tools module. https://www.drupal.org/project/views_chart_tools Follow this guideline: https://www.drupal.org/node/1675788
  • 60. Views: Slideshow Display We need an slideshow plugin for cycling the contents/fields
  • 61. Views: Slideshow Display Activate Modules: Libraries Views Slideshow,Views Slideshow Cycle Put the "jquery.cycle" JS library in sites/all/libraries, so that you will have a site/all/libraries/jquery.cycle/jquery.cycle.all.min.js
  • 62. Views: Slideshow Display Add a Photos field, then upload the 3 sample photos provided for each Tourist Spot.
  • 64. Views: Flex Slider Try also the responsive and nifty FlexSlider module: https://www.drupal.org/project/flexslider
  • 65. Views: Export Data as csv, xls, etc Activate Module: Views Data Export
  • 66. Views: Export Data as csv, xls, etc Essential idea: 1. Set the Display Format to XLS, CSV,etc. 2. Set the export Path. 3. Set the view that it will be attached to.
  • 67. Views: Export Data as csv, xls, etc
  • 68. Exercise: Highlighted Content Create a new Block display in the left sidebar.The first content should display its Title and Photo, the rest, display their Titles only.
  • 70. What's More? 1.Views PDF 2. Entity Views Attachment (EVA) 3. Nodequeue 4. EFQ Views 5.Views Accelerator 6. and so on (explore Views-related modules in Drupal.org)
  • 71. “Views changed my life..”
  • 72. “..and it is about to change yours.”