SlideShare une entreprise Scribd logo
1  sur  29
Hong Kong Drupal User Group
(HKDUG)
Overriding Themable Output in Drupal 7
DrupalCamp Hong Kong
2014 June 14th
Edison Wong
● CEO, PantaRei Design
– hswong3i@pantarei-design.com
● Drupal developer & contributor
– https://drupal.org/user/33940
● HKDUG Co-founder
– https://groups.drupal.org/drupalhk
● Startup founder
– 2009 - PantaRei Design founded
– 2010 - YBHK applicant
– 2011 - ITF SERAP applicant
– 2011 - HKSTP Incu-Tech applicant
PantaRei Design
● Hong Kong based Free and Open Source Software (FOSS) service
provider
– Content Management System (CMS) with Drupal
– Cloud hosting with Amazon Web Services (AWS)
● Business Partnership
– 2012 - AWS Consulting Partner
– 2013 - Acquia Partner
– 2013 - Atlassian Experts
– 2014 - Rackspace Hosting Partner
● FOSS Contributor
– 2008 - Hong Kong Drupal User Group Co-founder
– 2012 - Drupal Services Provider
Outline
● What is Drupal Theme?
● Why Override Themable Output?
● How To Override Themable Output?
What is Drupal Theme?
● Can change the appearance of an entire site
● Change layouts, images or fonts
● Hide or display fields dependent on user role
● Dynamically respond to changes in the content
or to user input
Why Override Themable Output?
● Don't hack core!
● Modify HTML markup
– Change HTML the Drupal way
– Using PHP for theming
● Overriding CSS
How To Override Themable Output?
● Avoiding having to override at all
– Can you just change a setting?
– Can you accomplish your goal through CSS?
● Overriding theme functions
● Overriding a theme file
● Finding where the themable output is coming
from
Overriding theme functions
● Open your theme's template.php file in a plain
text editor
● Copy the theme or template function you found
into your template.php file
● Rename the function you copied in, e.g.
– From “function theme_xyz($a, $b, $c) {“
– To “function wonderful_xyz($a, $b, $c) {“
Overriding theme functions (cont.)
● https://api.drupal.org/api/drupal/includes!theme.inc/
● https://api.drupal.org/api/drupal/themes!garland!tem
Overriding a theme file
● Copy the theme file to your theme directory
● Modify the file so it does what you want it to do
● Upload the file to your web site, including the
new base theme file if necessary, into your
theme's directory
● Refresh the theme cache
Overriding a theme file (cont.)
● https://api.drupal.org/api/drupal/modules!node!node
● https://api.drupal.org/api/drupal/themes!garland!nod
Finding where the themable output
is coming from
● Finding the source
● Understand the system of overrides
● “Function” vs “Template”
● Using the “Theme developer” module
Q&A
References
● https://drupal.org/node/341628
● https://drupal.org/node/457740
● https://drupal.org/node/173880
I Need More Help!
● Read documents from Drupal Community
– https://drupal.org/documentation
● Join Hong Kong Drupal User Group
– Event organizing: http://www.meetup.com/drupalhk
– Technological discussion: https://groups.drupal.org/drupalhk
– Business connection:
http://www.linkedin.com/groups/?gid=6644792
– General sharing: https://www.facebook.com/groups/drupalhk
● Contact us for one (1) month free-trial support service
– http://pantarei-design.com/services/support/#support-service-plans
Thank You
● Please feel free to contact us:
– Unit 207, 2/F IC Development Centre, No.6 Science
Park West Avenue, Hong Kong Science Park,
Shatin, N.T.
– +852 3576 3812
– http://pantarei-design.com/
– sales@pantarei-design.com

Contenu connexe

En vedette

Hong Kong Drupal User Group - 2014 May 10th
Hong Kong Drupal User Group - 2014 May 10thHong Kong Drupal User Group - 2014 May 10th
Hong Kong Drupal User Group - 2014 May 10thWong Hoi Sing Edison
 
Pediatric casepresentation3
Pediatric casepresentation3Pediatric casepresentation3
Pediatric casepresentation3Ashwath Kumar
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?Wong Hoi Sing Edison
 
DruStack- a mobile-friendly web content management system (cms
DruStack- a mobile-friendly web content management system (cmsDruStack- a mobile-friendly web content management system (cms
DruStack- a mobile-friendly web content management system (cmsWong Hoi Sing Edison
 
Hong Kong Drupal User Group - Sep 13th
Hong Kong Drupal User Group - Sep 13thHong Kong Drupal User Group - Sep 13th
Hong Kong Drupal User Group - Sep 13thWong Hoi Sing Edison
 
Open Innovation Lab (OIL) - 2014 Sep 26th
Open Innovation Lab (OIL) - 2014 Sep 26thOpen Innovation Lab (OIL) - 2014 Sep 26th
Open Innovation Lab (OIL) - 2014 Sep 26thWong Hoi Sing Edison
 
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro WorkshopOpen Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro WorkshopWong Hoi Sing Edison
 

En vedette (9)

Hong Kong Drupal User Group - 2014 May 10th
Hong Kong Drupal User Group - 2014 May 10thHong Kong Drupal User Group - 2014 May 10th
Hong Kong Drupal User Group - 2014 May 10th
 
Pediatric casepresentation3
Pediatric casepresentation3Pediatric casepresentation3
Pediatric casepresentation3
 
jmgc analytics
jmgc analyticsjmgc analytics
jmgc analytics
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
 
DruStack- a mobile-friendly web content management system (cms
DruStack- a mobile-friendly web content management system (cmsDruStack- a mobile-friendly web content management system (cms
DruStack- a mobile-friendly web content management system (cms
 
House bill 49
House bill 49House bill 49
House bill 49
 
Hong Kong Drupal User Group - Sep 13th
Hong Kong Drupal User Group - Sep 13thHong Kong Drupal User Group - Sep 13th
Hong Kong Drupal User Group - Sep 13th
 
Open Innovation Lab (OIL) - 2014 Sep 26th
Open Innovation Lab (OIL) - 2014 Sep 26thOpen Innovation Lab (OIL) - 2014 Sep 26th
Open Innovation Lab (OIL) - 2014 Sep 26th
 
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro WorkshopOpen Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
 

Similaire à Hong Kong Drupal User Group - 2014 June 14th

Atomicant Drupal 6 Theming
Atomicant Drupal 6 ThemingAtomicant Drupal 6 Theming
Atomicant Drupal 6 ThemingMarek Sotak
 
Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012scorlosquet
 
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?Wong Hoi Sing Edison
 
Ready. Set. Drupal! An Intro to Drupal 8, Part 2
Ready. Set. Drupal! An Intro to Drupal 8, Part 2Ready. Set. Drupal! An Intro to Drupal 8, Part 2
Ready. Set. Drupal! An Intro to Drupal 8, Part 2Acquia
 
Drupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xDrupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xWong Hoi Sing Edison
 
Hong kong drupal user group july 12th - introduction of some most popular d...
Hong kong drupal user group   july 12th - introduction of some most popular d...Hong kong drupal user group   july 12th - introduction of some most popular d...
Hong kong drupal user group july 12th - introduction of some most popular d...Francis Yan
 
Hadoop on OpenStack - Sahara @DevNation 2014
Hadoop on OpenStack - Sahara @DevNation 2014Hadoop on OpenStack - Sahara @DevNation 2014
Hadoop on OpenStack - Sahara @DevNation 2014spinningmatt
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Paul McKibben
 
Drupal + composer = new love !?
Drupal + composer = new love !?Drupal + composer = new love !?
Drupal + composer = new love !?nuppla
 
Drupal 8 as a Drop-In Content Engine - SymfonyLive Berlin 2015
Drupal 8 as a Drop-In Content Engine - SymfonyLive Berlin 2015Drupal 8 as a Drop-In Content Engine - SymfonyLive Berlin 2015
Drupal 8 as a Drop-In Content Engine - SymfonyLive Berlin 2015Jeffrey McGuire
 
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Ben Shell
 
Learning PHP for Drupal Theming, DC Chicago 2009
Learning PHP for Drupal Theming, DC Chicago 2009Learning PHP for Drupal Theming, DC Chicago 2009
Learning PHP for Drupal Theming, DC Chicago 2009Emma Jane Hogbin Westby
 
Slides semantic web and Drupal 7 NYCCamp 2012
Slides semantic web and Drupal 7 NYCCamp 2012Slides semantic web and Drupal 7 NYCCamp 2012
Slides semantic web and Drupal 7 NYCCamp 2012scorlosquet
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
When Drupal and RDF meet
When Drupal and RDF meetWhen Drupal and RDF meet
When Drupal and RDF meetscorlosquet
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyMarcos Labad
 

Similaire à Hong Kong Drupal User Group - 2014 June 14th (20)

Atomicant Drupal 6 Theming
Atomicant Drupal 6 ThemingAtomicant Drupal 6 Theming
Atomicant Drupal 6 Theming
 
Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012
 
Drupal Front End PHP
Drupal Front End PHPDrupal Front End PHP
Drupal Front End PHP
 
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
 
Ready. Set. Drupal! An Intro to Drupal 8, Part 2
Ready. Set. Drupal! An Intro to Drupal 8, Part 2Ready. Set. Drupal! An Intro to Drupal 8, Part 2
Ready. Set. Drupal! An Intro to Drupal 8, Part 2
 
Drupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xDrupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.x
 
Hong kong drupal user group july 12th - introduction of some most popular d...
Hong kong drupal user group   july 12th - introduction of some most popular d...Hong kong drupal user group   july 12th - introduction of some most popular d...
Hong kong drupal user group july 12th - introduction of some most popular d...
 
Hadoop on OpenStack - Sahara @DevNation 2014
Hadoop on OpenStack - Sahara @DevNation 2014Hadoop on OpenStack - Sahara @DevNation 2014
Hadoop on OpenStack - Sahara @DevNation 2014
 
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
 
Drupal in-depth
Drupal in-depthDrupal in-depth
Drupal in-depth
 
Drupal and RDF
Drupal and RDFDrupal and RDF
Drupal and RDF
 
Drupal + composer = new love !?
Drupal + composer = new love !?Drupal + composer = new love !?
Drupal + composer = new love !?
 
Drupal 8 as a Drop-In Content Engine - SymfonyLive Berlin 2015
Drupal 8 as a Drop-In Content Engine - SymfonyLive Berlin 2015Drupal 8 as a Drop-In Content Engine - SymfonyLive Berlin 2015
Drupal 8 as a Drop-In Content Engine - SymfonyLive Berlin 2015
 
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
 
Learning PHP for Drupal Theming, DC Chicago 2009
Learning PHP for Drupal Theming, DC Chicago 2009Learning PHP for Drupal Theming, DC Chicago 2009
Learning PHP for Drupal Theming, DC Chicago 2009
 
Slides semantic web and Drupal 7 NYCCamp 2012
Slides semantic web and Drupal 7 NYCCamp 2012Slides semantic web and Drupal 7 NYCCamp 2012
Slides semantic web and Drupal 7 NYCCamp 2012
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
When Drupal and RDF meet
When Drupal and RDF meetWhen Drupal and RDF meet
When Drupal and RDF meet
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
 

Plus de Wong Hoi Sing Edison

[HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution]
[HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution][HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution]
[HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution]Wong Hoi Sing Edison
 
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes][HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]Wong Hoi Sing Edison
 
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes][HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]Wong Hoi Sing Edison
 
[HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes]
[HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes][HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes]
[HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes]Wong Hoi Sing Edison
 
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes][BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]Wong Hoi Sing Edison
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...Wong Hoi Sing Edison
 
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GITWong Hoi Sing Edison
 
[20160314][CUHK][CSCI4140]Life of an Agile Team]
[20160314][CUHK][CSCI4140]Life of an Agile Team][20160314][CUHK][CSCI4140]Life of an Agile Team]
[20160314][CUHK][CSCI4140]Life of an Agile Team]Wong Hoi Sing Edison
 
BarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management System
BarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management SystemBarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management System
BarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management SystemWong Hoi Sing Edison
 
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8Wong Hoi Sing Edison
 
drustack a mobile-friendly web content management system (cms)
drustack   a mobile-friendly web content management system (cms)drustack   a mobile-friendly web content management system (cms)
drustack a mobile-friendly web content management system (cms)Wong Hoi Sing Edison
 
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile DevelopmentCUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile DevelopmentWong Hoi Sing Edison
 
OSS Community Meeting - OSS Community Management for Dummy
OSS Community Meeting - OSS Community Management for DummyOSS Community Meeting - OSS Community Management for Dummy
OSS Community Meeting - OSS Community Management for DummyWong Hoi Sing Edison
 
Barcamp Hong Kong 2014 - Introduction to GIT
Barcamp Hong Kong 2014 - Introduction to GITBarcamp Hong Kong 2014 - Introduction to GIT
Barcamp Hong Kong 2014 - Introduction to GITWong Hoi Sing Edison
 
Barcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management System
Barcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management SystemBarcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management System
Barcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management SystemWong Hoi Sing Edison
 
Hong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8thHong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8thWong Hoi Sing Edison
 
Open Source.HK Workshop - 2014 Oct 11th
Open Source.HK Workshop - 2014 Oct 11thOpen Source.HK Workshop - 2014 Oct 11th
Open Source.HK Workshop - 2014 Oct 11thWong Hoi Sing Edison
 
Barcamp Macau 2014 - Introduction to GIT
Barcamp Macau 2014 - Introduction to GITBarcamp Macau 2014 - Introduction to GIT
Barcamp Macau 2014 - Introduction to GITWong Hoi Sing Edison
 
Barcamp Macau 2014 - Introduction to AWS
Barcamp Macau 2014 - Introduction to AWSBarcamp Macau 2014 - Introduction to AWS
Barcamp Macau 2014 - Introduction to AWSWong Hoi Sing Edison
 

Plus de Wong Hoi Sing Edison (20)

[HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution]
[HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution][HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution]
[HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution]
 
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes][HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
 
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes][HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
 
[HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes]
[HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes][HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes]
[HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes]
 
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes][BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
 
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
 
[20160314][CUHK][CSCI4140]Life of an Agile Team]
[20160314][CUHK][CSCI4140]Life of an Agile Team][20160314][CUHK][CSCI4140]Life of an Agile Team]
[20160314][CUHK][CSCI4140]Life of an Agile Team]
 
BarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management System
BarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management SystemBarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management System
BarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management System
 
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
 
drustack a mobile-friendly web content management system (cms)
drustack   a mobile-friendly web content management system (cms)drustack   a mobile-friendly web content management system (cms)
drustack a mobile-friendly web content management system (cms)
 
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile DevelopmentCUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
 
OSS Community Meeting - OSS Community Management for Dummy
OSS Community Meeting - OSS Community Management for DummyOSS Community Meeting - OSS Community Management for Dummy
OSS Community Meeting - OSS Community Management for Dummy
 
Barcamp Hong Kong 2014 - Introduction to GIT
Barcamp Hong Kong 2014 - Introduction to GITBarcamp Hong Kong 2014 - Introduction to GIT
Barcamp Hong Kong 2014 - Introduction to GIT
 
Barcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management System
Barcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management SystemBarcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management System
Barcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management System
 
Hong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8thHong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8th
 
Entrepreneurship Talk
Entrepreneurship TalkEntrepreneurship Talk
Entrepreneurship Talk
 
Open Source.HK Workshop - 2014 Oct 11th
Open Source.HK Workshop - 2014 Oct 11thOpen Source.HK Workshop - 2014 Oct 11th
Open Source.HK Workshop - 2014 Oct 11th
 
Barcamp Macau 2014 - Introduction to GIT
Barcamp Macau 2014 - Introduction to GITBarcamp Macau 2014 - Introduction to GIT
Barcamp Macau 2014 - Introduction to GIT
 
Barcamp Macau 2014 - Introduction to AWS
Barcamp Macau 2014 - Introduction to AWSBarcamp Macau 2014 - Introduction to AWS
Barcamp Macau 2014 - Introduction to AWS
 

Dernier

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Hong Kong Drupal User Group - 2014 June 14th

  • 1. Hong Kong Drupal User Group (HKDUG) Overriding Themable Output in Drupal 7 DrupalCamp Hong Kong 2014 June 14th
  • 2. Edison Wong ● CEO, PantaRei Design – hswong3i@pantarei-design.com ● Drupal developer & contributor – https://drupal.org/user/33940 ● HKDUG Co-founder – https://groups.drupal.org/drupalhk ● Startup founder – 2009 - PantaRei Design founded – 2010 - YBHK applicant – 2011 - ITF SERAP applicant – 2011 - HKSTP Incu-Tech applicant
  • 3. PantaRei Design ● Hong Kong based Free and Open Source Software (FOSS) service provider – Content Management System (CMS) with Drupal – Cloud hosting with Amazon Web Services (AWS) ● Business Partnership – 2012 - AWS Consulting Partner – 2013 - Acquia Partner – 2013 - Atlassian Experts – 2014 - Rackspace Hosting Partner ● FOSS Contributor – 2008 - Hong Kong Drupal User Group Co-founder – 2012 - Drupal Services Provider
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Outline ● What is Drupal Theme? ● Why Override Themable Output? ● How To Override Themable Output?
  • 9. What is Drupal Theme? ● Can change the appearance of an entire site ● Change layouts, images or fonts ● Hide or display fields dependent on user role ● Dynamically respond to changes in the content or to user input
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Why Override Themable Output? ● Don't hack core! ● Modify HTML markup – Change HTML the Drupal way – Using PHP for theming ● Overriding CSS
  • 15. How To Override Themable Output? ● Avoiding having to override at all – Can you just change a setting? – Can you accomplish your goal through CSS? ● Overriding theme functions ● Overriding a theme file ● Finding where the themable output is coming from
  • 16. Overriding theme functions ● Open your theme's template.php file in a plain text editor ● Copy the theme or template function you found into your template.php file ● Rename the function you copied in, e.g. – From “function theme_xyz($a, $b, $c) {“ – To “function wonderful_xyz($a, $b, $c) {“
  • 17. Overriding theme functions (cont.) ● https://api.drupal.org/api/drupal/includes!theme.inc/ ● https://api.drupal.org/api/drupal/themes!garland!tem
  • 18. Overriding a theme file ● Copy the theme file to your theme directory ● Modify the file so it does what you want it to do ● Upload the file to your web site, including the new base theme file if necessary, into your theme's directory ● Refresh the theme cache
  • 19. Overriding a theme file (cont.) ● https://api.drupal.org/api/drupal/modules!node!node ● https://api.drupal.org/api/drupal/themes!garland!nod
  • 20. Finding where the themable output is coming from ● Finding the source ● Understand the system of overrides ● “Function” vs “Template” ● Using the “Theme developer” module
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Q&A
  • 28. I Need More Help! ● Read documents from Drupal Community – https://drupal.org/documentation ● Join Hong Kong Drupal User Group – Event organizing: http://www.meetup.com/drupalhk – Technological discussion: https://groups.drupal.org/drupalhk – Business connection: http://www.linkedin.com/groups/?gid=6644792 – General sharing: https://www.facebook.com/groups/drupalhk ● Contact us for one (1) month free-trial support service – http://pantarei-design.com/services/support/#support-service-plans
  • 29. Thank You ● Please feel free to contact us: – Unit 207, 2/F IC Development Centre, No.6 Science Park West Avenue, Hong Kong Science Park, Shatin, N.T. – +852 3576 3812 – http://pantarei-design.com/ – sales@pantarei-design.com