SlideShare ist ein Scribd-Unternehmen logo
1 von 19
VIEWS for HACKERS an overview of Views programming v1.3 Karim Ratib (infojunkie@drupal) There's a module for that!
OBJECTIVES OF THIS TALK conceptual grasp of Views internal architecture ability to read Views and add-ons code ability to start coding Views add-ons
WHO AM I? Drupal user since 2005 infojunkie (uid 48424) Module author/maintainer since 2007 Views Bulk Operations Views Hacks Sheetnode Feeds Oauth Feeds Topics ... Drupal freelancer since 2008 There's a module for that! Vancouver, BC
OUTLINE CONTEXT  problem trivia definition   ARCHITECTURE overview components workflow file structure    EXAMPLES anatomy of Views add-ons
CONTEXT // problem coding node lists is boring coding node lists with filters is boring + 1 coding node lists with different themes is boring x 10 ... merlinofchaos chose to code all this for us!
CONTEXT // trivia   ,[object Object],  ,[object Object],   wc -l `find ./ -type f`     ,[object Object]
http://drupal.org/project/modules?filters=tid:89 ,[object Object],[object Object],      282K           Drupal      397K       CCK       269K   
CONTEXT // definition Views is a  SQL query generator and  renderer
ARCHITECTURE // overview // 1 SELECT n.title, u.name FROM {node} n INNER JOIN  {users} u ON n.uid = u.uid WHERE  n.status = 1 AND u.uid = arg(1) ORDER BY n.changed DESC hook_menu() => nodes/list theme('table', $results)
ARCHITECTURE // overview // 2 SELECT n.title, u.name  field FROM {node} n  base table = view type INNER JOIN  {users} u ON n.uid = u.uid  relationship WHERE  n.status = 1  filter AND u.uid = arg(1)  argument ORDER BY n.changed DESC  sort hook_menu() => nodes/list  display (page) theme('table', $results)  style (table)
ARCHITECTURE // overview // 3 same concepts are found on the Views UI view type, display, style, fields, filters, etc.
ARCHITECTURE // components // 1 containment relationships
ARCHITECTURE // components // 2 plugin type relationships
ARCHITECTURE // components // 3 handler type relationships
ARCHITECTURE // workflow BUILD init components, get arguments, generate SQL view::build() hook_views_pre_build(), post_build() hook_views_query_alter() EXECUTE execute SQL, store results  view::execute() hook_views_pre_execute(), post_execute() RENDER execute theme functions view::render() hook_views_pre_render(), post_render()
ARCHITECTURE // file structure  views /   Drupal façade      ./includes   core: view, query, base classes      ./handlers   SQL add-ons: fields, filters, arguments,                                    relationships, sort      ./plugins   non-SQL add-ons: display, style, row,                                   arg default, arg validator, access, cache, query (3.x), exposed form (3.x), pager (3.x)      ./theme   theme and preprocessor files        ./modules   data models + specialized handlers          ./node          ./user          ./taxonomy ...
EXAMPLES // views_block Exposing Drupal block data model to Views hook_views_api() inform Views that we exist (in mymodule.module) hook_views_data() define our data model (in mymodule.views.inc) hook_views_handlers() declare our field handlers (in mymodule.views.inc) hook_views_default_views() define our default views (in mymodule.views_default.inc) handlers classes define our field handlers (in individual files)
EXAMPLES // views_flipped_table Provide new style plugin to render view results hook_views_api() inform Views that we exist (in mymodule.module) hook_views_plugins() declare our style plugin (in mymodule.views.inc) theme template as declared above (in separate file) theme preprocessor corresponding to theme template (in mymodule.module)
EXAMPLES // views_autosubmit Auto-submit exposed form elements hook_views_api() not needed because we're bypassing Views! hook_form_views_exposed_form_alter() form altering code for Views exposed filters (in mymodule.module) Drupal.behaviors.views_autosubmit() bind to form input change to auto-submit the form (in mymodule.js)

Weitere ähnliche Inhalte

Andere mochten auch

Anahata as Heart-centered Consciousness
Anahata as Heart-centered ConsciousnessAnahata as Heart-centered Consciousness
Anahata as Heart-centered ConsciousnessRobert Beshara
 
Overview of Metabletics
Overview of MetableticsOverview of Metabletics
Overview of MetableticsRobert Beshara
 
Trees In The Database - Advanced data structures
Trees In The Database - Advanced data structuresTrees In The Database - Advanced data structures
Trees In The Database - Advanced data structuresLorenzo Alberton
 
Checkdesk: Collaborative Verification in Action
Checkdesk: Collaborative Verification in ActionCheckdesk: Collaborative Verification in Action
Checkdesk: Collaborative Verification in ActionKarim Ratib
 

Andere mochten auch (6)

Meditation
MeditationMeditation
Meditation
 
Anahata as Heart-centered Consciousness
Anahata as Heart-centered ConsciousnessAnahata as Heart-centered Consciousness
Anahata as Heart-centered Consciousness
 
Overview of Metabletics
Overview of MetableticsOverview of Metabletics
Overview of Metabletics
 
Self and identities
Self and identitiesSelf and identities
Self and identities
 
Trees In The Database - Advanced data structures
Trees In The Database - Advanced data structuresTrees In The Database - Advanced data structures
Trees In The Database - Advanced data structures
 
Checkdesk: Collaborative Verification in Action
Checkdesk: Collaborative Verification in ActionCheckdesk: Collaborative Verification in Action
Checkdesk: Collaborative Verification in Action
 

Ähnlich wie Views for hackers v1.3

Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build themDick Olsson
 
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...Carl Brown
 
Drupal tips 'n tricks
Drupal tips 'n tricksDrupal tips 'n tricks
Drupal tips 'n tricksJohn Tsevdos
 
Patterns in Python
Patterns in PythonPatterns in Python
Patterns in Pythondn
 
Killer Scenarios with Data Lake in Azure with U-SQL
Killer Scenarios with Data Lake in Azure with U-SQLKiller Scenarios with Data Lake in Azure with U-SQL
Killer Scenarios with Data Lake in Azure with U-SQLMichael Rys
 
Intro to iOS Development • Made by Many
Intro to iOS Development • Made by ManyIntro to iOS Development • Made by Many
Intro to iOS Development • Made by Manykenatmxm
 
Object-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesObject-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesDurgesh Singh
 
Opensource gis development - part 5
Opensource gis development - part 5Opensource gis development - part 5
Opensource gis development - part 5Andrea Antonello
 
Breaking down data silos with the open data protocol
Breaking down data silos with the open data protocolBreaking down data silos with the open data protocol
Breaking down data silos with the open data protocolWoodruff Solutions LLC
 
Making views - DrupalGov Canberra 2017
Making views - DrupalGov Canberra 2017Making views - DrupalGov Canberra 2017
Making views - DrupalGov Canberra 2017Donna Benjamin
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsITNet
 
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)Konstantin Komelin
 

Ähnlich wie Views for hackers v1.3 (20)

Drupal 8 Hooks
Drupal 8 HooksDrupal 8 Hooks
Drupal 8 Hooks
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build them
 
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...
 
B13 Investigating oracle by Julian Dyke
B13 Investigating oracle by Julian DykeB13 Investigating oracle by Julian Dyke
B13 Investigating oracle by Julian Dyke
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Drupal tips 'n tricks
Drupal tips 'n tricksDrupal tips 'n tricks
Drupal tips 'n tricks
 
Dn D Custom 1
Dn D Custom 1Dn D Custom 1
Dn D Custom 1
 
Dn D Custom 1
Dn D Custom 1Dn D Custom 1
Dn D Custom 1
 
Patterns in Python
Patterns in PythonPatterns in Python
Patterns in Python
 
Killer Scenarios with Data Lake in Azure with U-SQL
Killer Scenarios with Data Lake in Azure with U-SQLKiller Scenarios with Data Lake in Azure with U-SQL
Killer Scenarios with Data Lake in Azure with U-SQL
 
Intro to iOS Development • Made by Many
Intro to iOS Development • Made by ManyIntro to iOS Development • Made by Many
Intro to iOS Development • Made by Many
 
Object-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesObject-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modules
 
Opensource gis development - part 5
Opensource gis development - part 5Opensource gis development - part 5
Opensource gis development - part 5
 
Breaking down data silos with the open data protocol
Breaking down data silos with the open data protocolBreaking down data silos with the open data protocol
Breaking down data silos with the open data protocol
 
Making views - DrupalGov Canberra 2017
Making views - DrupalGov Canberra 2017Making views - DrupalGov Canberra 2017
Making views - DrupalGov Canberra 2017
 
Lobos Introduction
Lobos IntroductionLobos Introduction
Lobos Introduction
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objects
 
Best practices tekx
Best practices tekxBest practices tekx
Best practices tekx
 
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
 

Kürzlich hochgeladen

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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 WorkerThousandEyes
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
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
 
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
 
[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
 
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
 

Kürzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
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
 
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
 
[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
 
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
 

Views for hackers v1.3

  • 1. VIEWS for HACKERS an overview of Views programming v1.3 Karim Ratib (infojunkie@drupal) There's a module for that!
  • 2. OBJECTIVES OF THIS TALK conceptual grasp of Views internal architecture ability to read Views and add-ons code ability to start coding Views add-ons
  • 3. WHO AM I? Drupal user since 2005 infojunkie (uid 48424) Module author/maintainer since 2007 Views Bulk Operations Views Hacks Sheetnode Feeds Oauth Feeds Topics ... Drupal freelancer since 2008 There's a module for that! Vancouver, BC
  • 4. OUTLINE CONTEXT problem trivia definition   ARCHITECTURE overview components workflow file structure   EXAMPLES anatomy of Views add-ons
  • 5. CONTEXT // problem coding node lists is boring coding node lists with filters is boring + 1 coding node lists with different themes is boring x 10 ... merlinofchaos chose to code all this for us!
  • 6.
  • 7.
  • 8. CONTEXT // definition Views is a SQL query generator and renderer
  • 9. ARCHITECTURE // overview // 1 SELECT n.title, u.name FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.status = 1 AND u.uid = arg(1) ORDER BY n.changed DESC hook_menu() => nodes/list theme('table', $results)
  • 10. ARCHITECTURE // overview // 2 SELECT n.title, u.name field FROM {node} n base table = view type INNER JOIN {users} u ON n.uid = u.uid relationship WHERE n.status = 1 filter AND u.uid = arg(1) argument ORDER BY n.changed DESC sort hook_menu() => nodes/list display (page) theme('table', $results) style (table)
  • 11. ARCHITECTURE // overview // 3 same concepts are found on the Views UI view type, display, style, fields, filters, etc.
  • 12. ARCHITECTURE // components // 1 containment relationships
  • 13. ARCHITECTURE // components // 2 plugin type relationships
  • 14. ARCHITECTURE // components // 3 handler type relationships
  • 15. ARCHITECTURE // workflow BUILD init components, get arguments, generate SQL view::build() hook_views_pre_build(), post_build() hook_views_query_alter() EXECUTE execute SQL, store results view::execute() hook_views_pre_execute(), post_execute() RENDER execute theme functions view::render() hook_views_pre_render(), post_render()
  • 16. ARCHITECTURE // file structure views / Drupal façade     ./includes core: view, query, base classes     ./handlers SQL add-ons: fields, filters, arguments,                                    relationships, sort      ./plugins non-SQL add-ons: display, style, row,                                  arg default, arg validator, access, cache, query (3.x), exposed form (3.x), pager (3.x)      ./theme theme and preprocessor files      ./modules data models + specialized handlers          ./node         ./user         ./taxonomy ...
  • 17. EXAMPLES // views_block Exposing Drupal block data model to Views hook_views_api() inform Views that we exist (in mymodule.module) hook_views_data() define our data model (in mymodule.views.inc) hook_views_handlers() declare our field handlers (in mymodule.views.inc) hook_views_default_views() define our default views (in mymodule.views_default.inc) handlers classes define our field handlers (in individual files)
  • 18. EXAMPLES // views_flipped_table Provide new style plugin to render view results hook_views_api() inform Views that we exist (in mymodule.module) hook_views_plugins() declare our style plugin (in mymodule.views.inc) theme template as declared above (in separate file) theme preprocessor corresponding to theme template (in mymodule.module)
  • 19. EXAMPLES // views_autosubmit Auto-submit exposed form elements hook_views_api() not needed because we're bypassing Views! hook_form_views_exposed_form_alter() form altering code for Views exposed filters (in mymodule.module) Drupal.behaviors.views_autosubmit() bind to form input change to auto-submit the form (in mymodule.js)
  • 20. Karim Ratib (infojunkie@drupal) There's a module for that! http://there is a module for that.com Thank you!