SlideShare uma empresa Scribd logo
1 de 18
[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

Mais conteúdo relacionado

Mais procurados

11. CodeIgniter vederea unei singure inregistrari
11. CodeIgniter vederea unei singure inregistrari11. CodeIgniter vederea unei singure inregistrari
11. CodeIgniter vederea unei singure inregistrariRazvan Raducanu, PhD
 
Drupal Lightning FAPI Jumpstart
Drupal Lightning FAPI JumpstartDrupal Lightning FAPI Jumpstart
Drupal Lightning FAPI Jumpstartguestfd47e4c7
 
Oop php 5
Oop php 5Oop php 5
Oop php 5phpubl
 
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 XuSencha
 
Apostrophe
ApostropheApostrophe
Apostrophetompunk
 
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 ModulesJens 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 APIAlexandru Badiu
 
Автотесты для картинок
Автотесты для картинокАвтотесты для картинок
Автотесты для картинокPetr Trofimov
 
Rapid Prototyping with PEAR
Rapid Prototyping with PEARRapid Prototyping with PEAR
Rapid Prototyping with PEARMarkus Wolff
 
Porting adsense module to Drupal 8
Porting adsense module to Drupal 8Porting adsense module to Drupal 8
Porting adsense module to Drupal 8João Ventura
 
Image manipulation in WordPress 3.5
Image manipulation in WordPress 3.5Image manipulation in WordPress 3.5
Image manipulation in WordPress 3.5Marko Heijnen
 
Андрей Юртаев - Improve theming with (Twitter) Bootstrap
Андрей Юртаев - Improve theming with (Twitter) BootstrapАндрей Юртаев - Improve theming with (Twitter) Bootstrap
Андрей Юртаев - Improve theming with (Twitter) BootstrapDrupalSPB
 
Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Ted Kulp
 

Mais procurados (19)

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
 
Porting adsense module to Drupal 8
Porting adsense module to Drupal 8Porting adsense module to Drupal 8
Porting adsense module to Drupal 8
 
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
 

Destaque

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 - Radian6David 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
 
Drupal 7 Theme System
Drupal 7 Theme SystemDrupal 7 Theme System
Drupal 7 Theme SystemPeter Arato
 

Destaque (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
 

Semelhante a 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 facetsAnyforSoft
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practicesmanugoel2003
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress WebsitesKyle 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 2018Adam 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 - OSI Days 2010
Drupal Module Development - OSI Days 2010Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010Siva Epari
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Developmentipsitamishra
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme EnlightenmentAmanda Giles
 
Prateek dayal backbonerails-110528024926-phpapp02
Prateek dayal backbonerails-110528024926-phpapp02Prateek dayal backbonerails-110528024926-phpapp02
Prateek dayal backbonerails-110528024926-phpapp02Revath 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 RailsPrateek 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 8Logan Farr
 
Has Many And Belongs To Many
Has Many And Belongs To ManyHas Many And Belongs To Many
Has Many And Belongs To Manyguest80d303
 

Semelhante a 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 - OSI Days 2010
Drupal Module Development - OSI Days 2010Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
 
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
 

Mais de 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 UpRyan Cross
 
Sydney Drupal News Feburary 2013
Sydney Drupal News Feburary 2013Sydney Drupal News Feburary 2013
Sydney Drupal News Feburary 2013Ryan 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 FeedsRyan 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 BallRyan Cross
 
Converting Static Html To Drupal Theme
Converting Static Html To Drupal ThemeConverting Static Html To Drupal Theme
Converting Static Html To Drupal ThemeRyan Cross
 
Modify a Theme
Modify a ThemeModify a Theme
Modify a ThemeRyan Cross
 

Mais de 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
 

Último

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
[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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
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
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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...
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
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
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

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