SlideShare a Scribd company logo
[object Object],Theming of Table Views Using: Overriding theme functions   Signwriter Module   jTooltips Module   Custom Module By Geoff Davies (gpdinoz) from Behind the Page
Cabling On Line is a Directory of links for the Australian and New Zealand Cabling Industry. People can register and submit information about their products and services with links to their own site for more information. If they want more listings there are 4 levels of paid  sponsorship available. Each type of product or service is listed using a table view with it's filter on a separate page so listing can be searched for relevant entries. Some Drupal Specs 11 Types of users with 5 sponsorship levels => 62 roles 31 Custom Node Types (using CCK)‏ 35 Views It is a work in progress with a custom theme still to come and a lot more explanatory text needed. Introduction
 
 
46 columns wide table  Table Headings running vertical Dots in table with hover tooltips  Filter on separate page Features
Filter on Separate page
Standard Drupal theming
With Custom theming
Overriding theme functions theme_views_view_table (Standard Drupal theming for views tables)  phptemplate_views_view_table (Overrides all view table theming)  phptemplate_views_view_table_Contractors (Overrides only Contractors view table theming)  (Place in template.php)
theme_views_view_table function theme_views_view_table($view, $nodes, $type) { $fields = _views_get_fields(); foreach ($nodes as $node) { $row = array(); foreach ($view->field as $field) { if ($fields[$field['id']]['visible'] !== FALSE) { $cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields,  $field, $node, $view); $cell['class'] = "view-field ". views_css_safe('view-field-'. $field['queryname']); $row[] = $cell; } } $rows[] = $row; } return theme('table', $view->table_header, $rows); }
Overiding the function in template.php function phptemplate_views_view_table_Contractors($view, $nodes, $type) { $fields = _views_get_fields(); foreach ($nodes as $node) { $row = array(); foreach ($view->field as $field) { if ($fields[$field['id']]['visible'] !== FALSE) { switch ($field['field']) { case 'title'; case 'field_contractor_sponsership_value'; case 'field_contractor_website_url'; case 'field_contractor_postcode_value'; $cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view); $cell['class'] = "view-field ". views_css_safe('view-field-'. $field['queryname']); $row[] = $cell; break; default :...... cont
Display dots in cell if '1' in database default: $number = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view); if ($number ==1) { $number ='<img src=&quot;/media/headings/dot.png&quot; alt=&quot;Y&quot;  title=&quot;'.$field['label'].'&quot; >'; } else { $number =''; } $cell['data'] = $number; $cell['class'] = &quot;view-field &quot;. views_css_safe('view-field-'. $field['queryname']); $row[] = $cell; } } } $rows[] = $row; } . . . . . . . . . .continued, but first introducing the signwriter module
Signwriter Module The Signwriter module allows you to use custom fonts in headings. It does this by replacing html headings with an image generated from a TrueType font file which resides on the server.  It can also be embedded in your theme with the following code $profile = signwriter_load_profile('Theme Heading'); print signwriter_title_convert($title, $profile); I modified the signwriter module to write vertically. A few examples:
 
 
Replacing headers with images using Signwriter module $profile = signwriter_load_profile('ViewHeaders'); $profile->height = 220 ; foreach($view->table_header as $key=>$value){ if ( $key != 1 AND $key != 3){ $text = $view->table_header[$key]['data']; $view->table_header[$key]['data'] = signwriter_title_convert($text, $profile); } } return theme('table', $view->table_header, $rows, $attributes = array('id'=>'Contractors_view')); }
Custom Module Overview This module hides the filter on specific views and creates a separate page where it is displayed as checkboxes and in 4 columns hook_form_alter to hide the filter on the view hook_menu to create paths for each separate “search” page custom function that loads the correct filter and formats it as checkboxes and display them in 4 columns
The End

More Related Content

What's hot

D8 Form api
D8 Form apiD8 Form api
11. CodeIgniter vederea unei singure inregistrari
11. CodeIgniter vederea unei singure inregistrari11. CodeIgniter vederea unei singure inregistrari
11. CodeIgniter vederea unei singure inregistrari
Razvan Raducanu, PhD
 
Drupal Lightning FAPI Jumpstart
Drupal Lightning FAPI JumpstartDrupal Lightning FAPI Jumpstart
Drupal Lightning FAPI Jumpstart
guestfd47e4c7
 
Oop php 5
Oop php 5Oop php 5
Oop php 5
phpubl
 
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin XuSenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
Sencha
 
Apostrophe
ApostropheApostrophe
Apostrophe
tompunk
 
Think Generic - Add API's To Your Custom Modules
Think Generic - Add API's To Your Custom ModulesThink Generic - Add API's To Your Custom Modules
Think Generic - Add API's To Your Custom Modules
Jens Sørensen
 
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011camp_drupal_ua
 
Learning the basics of the Drupal API
Learning the basics of the Drupal APILearning the basics of the Drupal API
Learning the basics of the Drupal API
Alexandru Badiu
 
Zend framework 04 - forms
Zend framework 04 - formsZend framework 04 - forms
Zend framework 04 - forms
Tricode (part of Dept)
 
Автотесты для картинок
Автотесты для картинокАвтотесты для картинок
Автотесты для картинок
Petr Trofimov
 
Rapid Prototyping with PEAR
Rapid Prototyping with PEARRapid Prototyping with PEAR
Rapid Prototyping with PEAR
Markus Wolff
 
Smarty
SmartySmarty
Smarty
Aravind Vel
 
Image manipulation in WordPress 3.5
Image manipulation in WordPress 3.5Image manipulation in WordPress 3.5
Image manipulation in WordPress 3.5
Marko Heijnen
 
Learn java script
Learn java scriptLearn java script
Learn java script
Mahmoud Asadi
 
Андрей Юртаев - Improve theming with (Twitter) Bootstrap
Андрей Юртаев - Improve theming with (Twitter) BootstrapАндрей Юртаев - Improve theming with (Twitter) Bootstrap
Андрей Юртаев - Improve theming with (Twitter) Bootstrap
DrupalSPB
 
Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101
Ted Kulp
 

What's hot (18)

D8 Form api
D8 Form apiD8 Form api
D8 Form api
 
11. CodeIgniter vederea unei singure inregistrari
11. CodeIgniter vederea unei singure inregistrari11. CodeIgniter vederea unei singure inregistrari
11. CodeIgniter vederea unei singure inregistrari
 
Drupal Lightning FAPI Jumpstart
Drupal Lightning FAPI JumpstartDrupal Lightning FAPI Jumpstart
Drupal Lightning FAPI Jumpstart
 
Oop php 5
Oop php 5Oop php 5
Oop php 5
 
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin XuSenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
 
Apostrophe
ApostropheApostrophe
Apostrophe
 
Think Generic - Add API's To Your Custom Modules
Think Generic - Add API's To Your Custom ModulesThink Generic - Add API's To Your Custom Modules
Think Generic - Add API's To Your Custom Modules
 
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
 
Framework
FrameworkFramework
Framework
 
Learning the basics of the Drupal API
Learning the basics of the Drupal APILearning the basics of the Drupal API
Learning the basics of the Drupal API
 
Zend framework 04 - forms
Zend framework 04 - formsZend framework 04 - forms
Zend framework 04 - forms
 
Автотесты для картинок
Автотесты для картинокАвтотесты для картинок
Автотесты для картинок
 
Rapid Prototyping with PEAR
Rapid Prototyping with PEARRapid Prototyping with PEAR
Rapid Prototyping with PEAR
 
Smarty
SmartySmarty
Smarty
 
Image manipulation in WordPress 3.5
Image manipulation in WordPress 3.5Image manipulation in WordPress 3.5
Image manipulation in WordPress 3.5
 
Learn java script
Learn java scriptLearn java script
Learn java script
 
Андрей Юртаев - Improve theming with (Twitter) Bootstrap
Андрей Юртаев - Improve theming with (Twitter) BootstrapАндрей Юртаев - Improve theming with (Twitter) Bootstrap
Андрей Юртаев - Improve theming with (Twitter) Bootstrap
 
Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101
 

Viewers also liked

Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Laura Scott
 
Using Twitter - Bold & the Blogging - David Alston - Radian6
Using Twitter - Bold & the Blogging - David Alston - Radian6Using Twitter - Bold & the Blogging - David Alston - Radian6
Using Twitter - Bold & the Blogging - David Alston - Radian6
David Alston
 
Creating Drupal 7 subtheme
Creating Drupal 7 subthemeCreating Drupal 7 subtheme
Creating Drupal 7 subthemeAdolfo Nasol
 
Drupal Essentials: Comment Management in Drupal 7
Drupal Essentials: Comment Management in Drupal 7Drupal Essentials: Comment Management in Drupal 7
Drupal Essentials: Comment Management in Drupal 7Acquia
 
A look at Drupal 7 Theming
A look at Drupal 7 ThemingA look at Drupal 7 Theming
A look at Drupal 7 Theming
Aimee Maree Forsstrom
 
Drupal 7 Theme System
Drupal 7 Theme SystemDrupal 7 Theme System
Drupal 7 Theme System
Peter Arato
 

Viewers also liked (6)

Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
 
Using Twitter - Bold & the Blogging - David Alston - Radian6
Using Twitter - Bold & the Blogging - David Alston - Radian6Using Twitter - Bold & the Blogging - David Alston - Radian6
Using Twitter - Bold & the Blogging - David Alston - Radian6
 
Creating Drupal 7 subtheme
Creating Drupal 7 subthemeCreating Drupal 7 subtheme
Creating Drupal 7 subtheme
 
Drupal Essentials: Comment Management in Drupal 7
Drupal Essentials: Comment Management in Drupal 7Drupal Essentials: Comment Management in Drupal 7
Drupal Essentials: Comment Management in Drupal 7
 
A look at Drupal 7 Theming
A look at Drupal 7 ThemingA look at Drupal 7 Theming
A look at Drupal 7 Theming
 
Drupal 7 Theme System
Drupal 7 Theme SystemDrupal 7 Theme System
Drupal 7 Theme System
 

Similar to Advanced Drupal Views: Theming your View

Display Suite: A Themers Perspective
Display Suite: A Themers PerspectiveDisplay Suite: A Themers Perspective
Display Suite: A Themers PerspectiveMediacurrent
 
Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes
ramakesavan
 
Drupal tips 'n tricks
Drupal tips 'n tricksDrupal tips 'n tricks
Drupal tips 'n tricksJohn Tsevdos
 
Coder Presentation Szeged
Coder Presentation SzegedCoder Presentation Szeged
Coder Presentation SzegedDoug Green
 
Drupal 8. Search API. Facets. Customize / combine facets
Drupal 8. Search API. Facets. Customize / combine facetsDrupal 8. Search API. Facets. Customize / combine facets
Drupal 8. Search API. Facets. Customize / combine facets
AnyforSoft
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
manugoel2003
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
Kyle Cearley
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
Adam Tomat
 
Vancouver League of Drupallers - Remembering the User (August 2008)
Vancouver League of Drupallers - Remembering the User (August 2008)Vancouver League of Drupallers - Remembering the User (August 2008)
Vancouver League of Drupallers - Remembering the User (August 2008)
baronmunchowsen
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
ipsitamishra
 
Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010
Siva Epari
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda Giles
 
WordCamp Praga 2015
WordCamp Praga 2015WordCamp Praga 2015
WordCamp Praga 2015
Tomasz Dziuda
 
Prateek dayal backbonerails-110528024926-phpapp02
Prateek dayal backbonerails-110528024926-phpapp02Prateek dayal backbonerails-110528024926-phpapp02
Prateek dayal backbonerails-110528024926-phpapp02
Revath S Kumar
 
Single Page Web Apps with Backbone.js and Rails
Single Page Web Apps with Backbone.js and RailsSingle Page Web Apps with Backbone.js and Rails
Single Page Web Apps with Backbone.js and Rails
Prateek Dayal
 
TurboGears2 Pluggable Applications
TurboGears2 Pluggable ApplicationsTurboGears2 Pluggable Applications
TurboGears2 Pluggable ApplicationsAlessandro Molina
 
8 things to know about theming in drupal 8
8 things to know about theming in drupal 88 things to know about theming in drupal 8
8 things to know about theming in drupal 8
Logan Farr
 
Has Many And Belongs To Many
Has Many And Belongs To ManyHas Many And Belongs To Many
Has Many And Belongs To Manyguest80d303
 
Php frameworks
Php frameworksPhp frameworks
Php frameworks
Anil Kumar Panigrahi
 

Similar to Advanced Drupal Views: Theming your View (20)

Display Suite: A Themers Perspective
Display Suite: A Themers PerspectiveDisplay Suite: A Themers Perspective
Display Suite: A Themers Perspective
 
Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes Drupal 7 Theming - Behind the scenes
Drupal 7 Theming - Behind the scenes
 
Drupal tips 'n tricks
Drupal tips 'n tricksDrupal tips 'n tricks
Drupal tips 'n tricks
 
Coder Presentation Szeged
Coder Presentation SzegedCoder Presentation Szeged
Coder Presentation Szeged
 
Drupal 8. Search API. Facets. Customize / combine facets
Drupal 8. Search API. Facets. Customize / combine facetsDrupal 8. Search API. Facets. Customize / combine facets
Drupal 8. Search API. Facets. Customize / combine facets
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
I Love codeigniter, You?
I Love codeigniter, You?I Love codeigniter, You?
I Love codeigniter, You?
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
 
Vancouver League of Drupallers - Remembering the User (August 2008)
Vancouver League of Drupallers - Remembering the User (August 2008)Vancouver League of Drupallers - Remembering the User (August 2008)
Vancouver League of Drupallers - Remembering the User (August 2008)
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
 
Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
WordCamp Praga 2015
WordCamp Praga 2015WordCamp Praga 2015
WordCamp Praga 2015
 
Prateek dayal backbonerails-110528024926-phpapp02
Prateek dayal backbonerails-110528024926-phpapp02Prateek dayal backbonerails-110528024926-phpapp02
Prateek dayal backbonerails-110528024926-phpapp02
 
Single Page Web Apps with Backbone.js and Rails
Single Page Web Apps with Backbone.js and RailsSingle Page Web Apps with Backbone.js and Rails
Single Page Web Apps with Backbone.js and Rails
 
TurboGears2 Pluggable Applications
TurboGears2 Pluggable ApplicationsTurboGears2 Pluggable Applications
TurboGears2 Pluggable Applications
 
8 things to know about theming in drupal 8
8 things to know about theming in drupal 88 things to know about theming in drupal 8
8 things to know about theming in drupal 8
 
Has Many And Belongs To Many
Has Many And Belongs To ManyHas Many And Belongs To Many
Has Many And Belongs To Many
 
Php frameworks
Php frameworksPhp frameworks
Php frameworks
 

More from Ryan Cross

Introduction to Content Marketing Strategy for Drupal
Introduction to Content Marketing Strategy for Drupal Introduction to Content Marketing Strategy for Drupal
Introduction to Content Marketing Strategy for Drupal
Ryan Cross
 
DrupalCon Wrap Up
DrupalCon Wrap UpDrupalCon Wrap Up
DrupalCon Wrap Up
Ryan Cross
 
Sydney Drupal News Feburary 2013
Sydney Drupal News Feburary 2013Sydney Drupal News Feburary 2013
Sydney Drupal News Feburary 2013
Ryan Cross
 
Drupal news 2012 October
Drupal news 2012 OctoberDrupal news 2012 October
Drupal news 2012 OctoberRyan Cross
 
Sydney Drupal News June 2012
Sydney Drupal News June 2012Sydney Drupal News June 2012
Sydney Drupal News June 2012Ryan Cross
 
Sydney Drupal News April 2012
Sydney Drupal News April 2012Sydney Drupal News April 2012
Sydney Drupal News April 2012Ryan Cross
 
Sydney Drupal News August 2012
Sydney Drupal News August 2012Sydney Drupal News August 2012
Sydney Drupal News August 2012Ryan Cross
 
Sydney Drupal News July 2012
Sydney Drupal News July 2012Sydney Drupal News July 2012
Sydney Drupal News July 2012Ryan Cross
 
Sydney Drupal News February 2012
Sydney Drupal News February 2012Sydney Drupal News February 2012
Sydney Drupal News February 2012Ryan Cross
 
Sydney Drupal News May 2012
Sydney Drupal News May 2012Sydney Drupal News May 2012
Sydney Drupal News May 2012Ryan Cross
 
Sydney Drupal News September 2012
Sydney Drupal News September 2012Sydney Drupal News September 2012
Sydney Drupal News September 2012Ryan Cross
 
Sydney Drupal News March 2012
Sydney Drupal News March 2012Sydney Drupal News March 2012
Sydney Drupal News March 2012Ryan Cross
 
Lightning Talk: Drupal Feeds
Lightning Talk: Drupal FeedsLightning Talk: Drupal Feeds
Lightning Talk: Drupal Feeds
Ryan Cross
 
Sydney Drupal News February 2012
Sydney Drupal News February 2012Sydney Drupal News February 2012
Sydney Drupal News February 2012Ryan Cross
 
Sydney Drupal News March 2012
Sydney Drupal News March 2012Sydney Drupal News March 2012
Sydney Drupal News March 2012Ryan Cross
 
Drupal's Roadmap: The Magic 8 Ball
Drupal's Roadmap: The Magic 8 BallDrupal's Roadmap: The Magic 8 Ball
Drupal's Roadmap: The Magic 8 Ball
Ryan Cross
 
Converting Static Html To Drupal Theme
Converting Static Html To Drupal ThemeConverting Static Html To Drupal Theme
Converting Static Html To Drupal Theme
Ryan Cross
 
Modify a Theme
Modify a ThemeModify a Theme
Modify a Theme
Ryan Cross
 

More from Ryan Cross (20)

Introduction to Content Marketing Strategy for Drupal
Introduction to Content Marketing Strategy for Drupal Introduction to Content Marketing Strategy for Drupal
Introduction to Content Marketing Strategy for Drupal
 
DrupalCon Wrap Up
DrupalCon Wrap UpDrupalCon Wrap Up
DrupalCon Wrap Up
 
Sydney Drupal News Feburary 2013
Sydney Drupal News Feburary 2013Sydney Drupal News Feburary 2013
Sydney Drupal News Feburary 2013
 
Drupal news 2012 October
Drupal news 2012 OctoberDrupal news 2012 October
Drupal news 2012 October
 
Sydney Drupal News June 2012
Sydney Drupal News June 2012Sydney Drupal News June 2012
Sydney Drupal News June 2012
 
Sydney Drupal News April 2012
Sydney Drupal News April 2012Sydney Drupal News April 2012
Sydney Drupal News April 2012
 
Sydney Drupal News August 2012
Sydney Drupal News August 2012Sydney Drupal News August 2012
Sydney Drupal News August 2012
 
Sydney Drupal News July 2012
Sydney Drupal News July 2012Sydney Drupal News July 2012
Sydney Drupal News July 2012
 
Sydney Drupal News February 2012
Sydney Drupal News February 2012Sydney Drupal News February 2012
Sydney Drupal News February 2012
 
Sydney Drupal News May 2012
Sydney Drupal News May 2012Sydney Drupal News May 2012
Sydney Drupal News May 2012
 
Sydney Drupal News September 2012
Sydney Drupal News September 2012Sydney Drupal News September 2012
Sydney Drupal News September 2012
 
Sydney Drupal News March 2012
Sydney Drupal News March 2012Sydney Drupal News March 2012
Sydney Drupal News March 2012
 
Lightning Talk: Drupal Feeds
Lightning Talk: Drupal FeedsLightning Talk: Drupal Feeds
Lightning Talk: Drupal Feeds
 
Sydney Drupal News February 2012
Sydney Drupal News February 2012Sydney Drupal News February 2012
Sydney Drupal News February 2012
 
Sydney Drupal News March 2012
Sydney Drupal News March 2012Sydney Drupal News March 2012
Sydney Drupal News March 2012
 
Drupal's Roadmap: The Magic 8 Ball
Drupal's Roadmap: The Magic 8 BallDrupal's Roadmap: The Magic 8 Ball
Drupal's Roadmap: The Magic 8 Ball
 
Converting Static Html To Drupal Theme
Converting Static Html To Drupal ThemeConverting Static Html To Drupal Theme
Converting Static Html To Drupal Theme
 
Panels 2 Demo
Panels 2 DemoPanels 2 Demo
Panels 2 Demo
 
Modify a Theme
Modify a ThemeModify a Theme
Modify a Theme
 
Drupal Basics
Drupal BasicsDrupal Basics
Drupal Basics
 

Recently uploaded

A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 

Recently uploaded (20)

A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 

Advanced Drupal Views: Theming your View

  • 1.
  • 2. Cabling On Line is a Directory of links for the Australian and New Zealand Cabling Industry. People can register and submit information about their products and services with links to their own site for more information. If they want more listings there are 4 levels of paid sponsorship available. Each type of product or service is listed using a table view with it's filter on a separate page so listing can be searched for relevant entries. Some Drupal Specs 11 Types of users with 5 sponsorship levels => 62 roles 31 Custom Node Types (using CCK)‏ 35 Views It is a work in progress with a custom theme still to come and a lot more explanatory text needed. Introduction
  • 3.  
  • 4.  
  • 5. 46 columns wide table Table Headings running vertical Dots in table with hover tooltips Filter on separate page Features
  • 9. Overriding theme functions theme_views_view_table (Standard Drupal theming for views tables) phptemplate_views_view_table (Overrides all view table theming) phptemplate_views_view_table_Contractors (Overrides only Contractors view table theming) (Place in template.php)
  • 10. theme_views_view_table function theme_views_view_table($view, $nodes, $type) { $fields = _views_get_fields(); foreach ($nodes as $node) { $row = array(); foreach ($view->field as $field) { if ($fields[$field['id']]['visible'] !== FALSE) { $cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view); $cell['class'] = &quot;view-field &quot;. views_css_safe('view-field-'. $field['queryname']); $row[] = $cell; } } $rows[] = $row; } return theme('table', $view->table_header, $rows); }
  • 11. Overiding the function in template.php function phptemplate_views_view_table_Contractors($view, $nodes, $type) { $fields = _views_get_fields(); foreach ($nodes as $node) { $row = array(); foreach ($view->field as $field) { if ($fields[$field['id']]['visible'] !== FALSE) { switch ($field['field']) { case 'title'; case 'field_contractor_sponsership_value'; case 'field_contractor_website_url'; case 'field_contractor_postcode_value'; $cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view); $cell['class'] = &quot;view-field &quot;. views_css_safe('view-field-'. $field['queryname']); $row[] = $cell; break; default :...... cont
  • 12. Display dots in cell if '1' in database default: $number = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view); if ($number ==1) { $number ='<img src=&quot;/media/headings/dot.png&quot; alt=&quot;Y&quot; title=&quot;'.$field['label'].'&quot; >'; } else { $number =''; } $cell['data'] = $number; $cell['class'] = &quot;view-field &quot;. views_css_safe('view-field-'. $field['queryname']); $row[] = $cell; } } } $rows[] = $row; } . . . . . . . . . .continued, but first introducing the signwriter module
  • 13. Signwriter Module The Signwriter module allows you to use custom fonts in headings. It does this by replacing html headings with an image generated from a TrueType font file which resides on the server. It can also be embedded in your theme with the following code $profile = signwriter_load_profile('Theme Heading'); print signwriter_title_convert($title, $profile); I modified the signwriter module to write vertically. A few examples:
  • 14.  
  • 15.  
  • 16. Replacing headers with images using Signwriter module $profile = signwriter_load_profile('ViewHeaders'); $profile->height = 220 ; foreach($view->table_header as $key=>$value){ if ( $key != 1 AND $key != 3){ $text = $view->table_header[$key]['data']; $view->table_header[$key]['data'] = signwriter_title_convert($text, $profile); } } return theme('table', $view->table_header, $rows, $attributes = array('id'=>'Contractors_view')); }
  • 17. Custom Module Overview This module hides the filter on specific views and creates a separate page where it is displayed as checkboxes and in 4 columns hook_form_alter to hide the filter on the view hook_menu to create paths for each separate “search” page custom function that loads the correct filter and formats it as checkboxes and display them in 4 columns