SlideShare uma empresa Scribd logo
1 de 46
10 new kickass things
 about D7 theming
                  Trevor Twining
            Niagara Drupal User Group
     Senior Developer, Points of Light Institute

           http://pointsoflight.org
               @trevortwining
         trevortwining@gmail.com
        http://drupal.org/user/39694
15 seconds about me

 5yrs                    60projects



I make Drupal look like something
        that isn’t Drupal
The setup

• We’re all learning about D7 theming
• Lots of things besides these
• WOW things
• Links for more at end of presentation
go
123456789


Content is now a block
         (!)
content is a block???
• Add blocks above content
• put content somewhere else entirely
• mandatory region
123456789


Added jQuery UI (1.8)
       to core
so you can start adding things right away
1 2 3 4 5 6 7 8 9



peekaboo variables
hidey/showey $vars
hidey/showey $vars
•   To hide:
hidey/showey $vars
•   To hide:

      // We hide the comments and
    links now so that we can
    render them later.
hidey/showey $vars
•   To hide:

      // We hide the comments and
    links now so that we can
    render them later.

        hide($content['comments']);
hidey/showey $vars
•   To hide:

      // We hide the comments and
    links now so that we can
    render them later.

        hide($content['comments']);

        hide($content['links']);
hidey/showey $vars
•   To hide:

      // We hide the comments and
    links now so that we can
    render them later.

        hide($content['comments']);

        hide($content['links']);

        print render($content);
hidey/showey $vars
•   To hide:                          •   To show (somewhere else,
                                          later):
      // We hide the comments and
    links now so that we can
    render them later.

        hide($content['comments']);

        hide($content['links']);

        print render($content);
hidey/showey $vars
•   To hide:                          •   To show (somewhere else,
                                          later):
      // We hide the comments and
    links now so that we can              <?php print
    render them later.                    render($content['links']); ?>

        hide($content['comments']);

        hide($content['links']);

        print render($content);
hidey/showey $vars
•   To hide:                          •   To show (somewhere else,
                                          later):
      // We hide the comments and
    links now so that we can              <?php print
    render them later.                    render($content['links']); ?>

        hide($content['comments']);       <?php print
                                          render($content['comments']);
        hide($content['links']);          ?>.

        print render($content);
1 2 3 4 5 6 7 8 9



 a (metric) tonne of
core markup cleanup
Core Cleanup
Core Cleanup

•   left/right sidebars now first/second
Core Cleanup

•   left/right sidebars now first/second
•    $closure becomes $page_bottom, new $page_top and
    hidden regions
Core Cleanup

•   left/right sidebars now first/second
•    $closure becomes $page_bottom, new $page_top and
    hidden regions
•   Renamed $block->content to $content in block.tpl.php
Core Cleanup

•   left/right sidebars now first/second
•    $closure becomes $page_bottom, new $page_top and
    hidden regions
•   Renamed $block->content to $content in block.tpl.php
•   Browser-targeted CSS files can and should be added using
    drupal_add_css()
Core Cleanup

•   left/right sidebars now first/second
•    $closure becomes $page_bottom, new $page_top and
    hidden regions
•   Renamed $block->content to $content in block.tpl.php
•   Browser-targeted CSS files can and should be added using
    drupal_add_css()
•   Changes to alt and title attribute for the RSS feed icon
Core Cleanup pt deux
Core Cleanup pt deux
•   $picture changes to $user_picture, and the CSS class
    'picture' to 'user-picture'
Core Cleanup pt deux
•   $picture changes to $user_picture, and the CSS class
    'picture' to 'user-picture'
•   System module stylesheets have been reorganized to
    separate behavior-supportingstyles from presentational
    styles
Core Cleanup pt deux
•   $picture changes to $user_picture, and the CSS class
    'picture' to 'user-picture'
•   System module stylesheets have been reorganized to
    separate behavior-supportingstyles from presentational
    styles
•   clear-block --> .clearfix (yay!)
Core Cleanup pt deux
•   $picture changes to $user_picture, and the CSS class
    'picture' to 'user-picture'
•   System module stylesheets have been reorganized to
    separate behavior-supportingstyles from presentational
    styles
•   clear-block --> .clearfix (yay!)
•   Search box moved from theme layer to blocks
Core Cleanup pt deux
•   $picture changes to $user_picture, and the CSS class
    'picture' to 'user-picture'
•   System module stylesheets have been reorganized to
    separate behavior-supportingstyles from presentational
    styles
•   clear-block --> .clearfix (yay!)
•   Search box moved from theme layer to blocks


                  and many more
1 2 3 4 5 6 7 8 9



   PHPTemplate
suggestion wildcards
template wildcards

• page--user--%.tpl.php theme for any user
  display page
• page--user--%--edit.tpl.php for any user edit
  page (double dashes, hat tip to
  @merlinofchaos)
1 2 3 4 5 6 7 8 9



Cool Accessibility
   changes!
new accessibility
                changes in D7
•   New classes available to hide content in an accessible manner

    •   .element-invisible

    •   .element-hidden

•   Added markup to make installation task progress perceivable with
    screen-reader and CSS disabled.

•   theme_links() has a new parameter $heading for accessibility

•   Add an invisible heading to theme_breadcrumb()

•   Skip to main content links in core themes
1 2 3 4 5 6 7 8 9


very little new work in
  migrating your D6
    themes to D7
OMG less work RAWKS!
1 2 3 4 5 6 7 8 9


 preprocess can be used
  for any theming hook.
(templates and functions)
1 2 3 4 5 6 7 8 9



new hooks available
new D7 hook functions

• hook_page_alter
• hook_form_alter
• hook_js_alter
• hook_css_alter
hook_(freaking!)_
  page_alter();
hook_page_alter(&$page)

allows you to change any element on the
      page prior to being rendered.
hook_page_alter is covered
in kickass and smothered in
       awesomesauce.
SO. MUCH. MORE.
http://drupal.org/update/theme/6/7
So what’s this all mean?
When D7 ships, only one
thing will stop you from
making kickass themes...
You.

Mais conteúdo relacionado

Mais procurados

Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019Balázs Tatár
 
Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019Balázs Tatár
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendFITC
 
FamilySearch Reference Client
FamilySearch Reference ClientFamilySearch Reference Client
FamilySearch Reference ClientDallan Quass
 
sfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin BundlesfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin Bundleth0masr
 
Apostrophe
ApostropheApostrophe
Apostrophetompunk
 
Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Let's write secure Drupal code! - DrupalCamp Oslo, 2018Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Let's write secure Drupal code! - DrupalCamp Oslo, 2018Balázs Tatár
 
Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019Balázs Tatár
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHPVineet Kumar Saini
 
WordPress for developers - phpday 2011
WordPress for developers -  phpday 2011WordPress for developers -  phpday 2011
WordPress for developers - phpday 2011Maurizio Pelizzone
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPVineet Kumar Saini
 
Make your own wp cli command in 10min
Make your own wp cli command in 10minMake your own wp cli command in 10min
Make your own wp cli command in 10minIvelina Dimova
 
Contributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter WilsonContributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter WilsonWordCamp Sydney
 
How to make a WordPress theme
How to make a WordPress themeHow to make a WordPress theme
How to make a WordPress themeHardeep Asrani
 
Drupal vs WordPress
Drupal vs WordPressDrupal vs WordPress
Drupal vs WordPressWalter Ebert
 
Fields in Core: How to create a custom field
Fields in Core: How to create a custom fieldFields in Core: How to create a custom field
Fields in Core: How to create a custom fieldIvan Zugec
 

Mais procurados (20)

Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019
 
Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the Backend
 
FamilySearch Reference Client
FamilySearch Reference ClientFamilySearch Reference Client
FamilySearch Reference Client
 
sfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin BundlesfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin Bundle
 
Apostrophe
ApostropheApostrophe
Apostrophe
 
Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Let's write secure Drupal code! - DrupalCamp Oslo, 2018Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Let's write secure Drupal code! - DrupalCamp Oslo, 2018
 
18. images in symfony 4
18. images in symfony 418. images in symfony 4
18. images in symfony 4
 
Pagination in PHP
Pagination in PHPPagination in PHP
Pagination in PHP
 
Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHP
 
WordPress for developers - phpday 2011
WordPress for developers -  phpday 2011WordPress for developers -  phpday 2011
WordPress for developers - phpday 2011
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHP
 
Make your own wp cli command in 10min
Make your own wp cli command in 10minMake your own wp cli command in 10min
Make your own wp cli command in 10min
 
Contributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter WilsonContributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter Wilson
 
How to make a WordPress theme
How to make a WordPress themeHow to make a WordPress theme
How to make a WordPress theme
 
Assetic (Zendcon)
Assetic (Zendcon)Assetic (Zendcon)
Assetic (Zendcon)
 
Drupal vs WordPress
Drupal vs WordPressDrupal vs WordPress
Drupal vs WordPress
 
Drupal as a framework
Drupal as a frameworkDrupal as a framework
Drupal as a framework
 
Fields in Core: How to create a custom field
Fields in Core: How to create a custom fieldFields in Core: How to create a custom field
Fields in Core: How to create a custom field
 

Semelhante a Kickass

D7 theming what's new - London
D7 theming what's new - LondonD7 theming what's new - London
D7 theming what's new - LondonMarek Sotak
 
Grok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb updateGrok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb updateLaura Scott
 
Theme Kickstart
Theme KickstartTheme Kickstart
Theme KickstartPeter
 
Changes to Drupal Themes in version 7 (part 1)
Changes to Drupal Themes in version 7 (part 1)Changes to Drupal Themes in version 7 (part 1)
Changes to Drupal Themes in version 7 (part 1)Chris Charlton
 
Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Anne Tomasevich
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1Yoav Farhi
 
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
 
Drupal Install Profiles
Drupal Install ProfilesDrupal Install Profiles
Drupal Install ProfilesChris Parsons
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is nowGonzalo Cordero
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Ryan Price
 
What's new in the Drupal 7 API?
What's new in the Drupal 7 API?What's new in the Drupal 7 API?
What's new in the Drupal 7 API?Alexandru Badiu
 
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Emma Jane Hogbin Westby
 
Grok Drupal (7) Theming
Grok Drupal (7) ThemingGrok Drupal (7) Theming
Grok Drupal (7) ThemingPINGV
 
Theming Search Results - How to Make Your Search Results Rock
Theming Search Results - How to Make Your Search Results RockTheming Search Results - How to Make Your Search Results Rock
Theming Search Results - How to Make Your Search Results RockAubrey Sambor
 
ViA Bootstrap 4
ViA Bootstrap 4ViA Bootstrap 4
ViA Bootstrap 4imdurgesh
 
Fronteers - Drupal 7 ux
Fronteers   - Drupal 7 uxFronteers   - Drupal 7 ux
Fronteers - Drupal 7 uxBojhan
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal DevelopmentJeff Eaton
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme EnlightenmentAmanda Giles
 

Semelhante a Kickass (20)

D7 theming what's new - London
D7 theming what's new - LondonD7 theming what's new - London
D7 theming what's new - London
 
Grok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb updateGrok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb update
 
Theme Kickstart
Theme KickstartTheme Kickstart
Theme Kickstart
 
Changes to Drupal Themes in version 7 (part 1)
Changes to Drupal Themes in version 7 (part 1)Changes to Drupal Themes in version 7 (part 1)
Changes to Drupal Themes in version 7 (part 1)
 
Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
 
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
 
Drupal Install Profiles
Drupal Install ProfilesDrupal Install Profiles
Drupal Install Profiles
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
Efficient theming in Drupal
Efficient theming in DrupalEfficient theming in Drupal
Efficient theming in Drupal
 
What's new in the Drupal 7 API?
What's new in the Drupal 7 API?What's new in the Drupal 7 API?
What's new in the Drupal 7 API?
 
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010
 
Grok Drupal (7) Theming
Grok Drupal (7) ThemingGrok Drupal (7) Theming
Grok Drupal (7) Theming
 
Theming Search Results - How to Make Your Search Results Rock
Theming Search Results - How to Make Your Search Results RockTheming Search Results - How to Make Your Search Results Rock
Theming Search Results - How to Make Your Search Results Rock
 
ViA Bootstrap 4
ViA Bootstrap 4ViA Bootstrap 4
ViA Bootstrap 4
 
Fronteers - Drupal 7 ux
Fronteers   - Drupal 7 uxFronteers   - Drupal 7 ux
Fronteers - Drupal 7 ux
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal Development
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 

Último

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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
 

Último (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 

Kickass

  • 1. 10 new kickass things about D7 theming Trevor Twining Niagara Drupal User Group Senior Developer, Points of Light Institute http://pointsoflight.org @trevortwining trevortwining@gmail.com http://drupal.org/user/39694
  • 2. 15 seconds about me 5yrs 60projects I make Drupal look like something that isn’t Drupal
  • 3. The setup • We’re all learning about D7 theming • Lots of things besides these • WOW things • Links for more at end of presentation
  • 4. go
  • 6. content is a block??? • Add blocks above content • put content somewhere else entirely • mandatory region
  • 7. 123456789 Added jQuery UI (1.8) to core so you can start adding things right away
  • 8. 1 2 3 4 5 6 7 8 9 peekaboo variables
  • 11. hidey/showey $vars • To hide:   // We hide the comments and links now so that we can render them later.
  • 12. hidey/showey $vars • To hide:   // We hide the comments and links now so that we can render them later.     hide($content['comments']);
  • 13. hidey/showey $vars • To hide:   // We hide the comments and links now so that we can render them later.     hide($content['comments']);     hide($content['links']);
  • 14. hidey/showey $vars • To hide:   // We hide the comments and links now so that we can render them later.     hide($content['comments']);     hide($content['links']);     print render($content);
  • 15. hidey/showey $vars • To hide: • To show (somewhere else, later):   // We hide the comments and links now so that we can render them later.     hide($content['comments']);     hide($content['links']);     print render($content);
  • 16. hidey/showey $vars • To hide: • To show (somewhere else, later):   // We hide the comments and links now so that we can <?php print render them later. render($content['links']); ?>     hide($content['comments']);     hide($content['links']);     print render($content);
  • 17. hidey/showey $vars • To hide: • To show (somewhere else, later):   // We hide the comments and links now so that we can <?php print render them later. render($content['links']); ?>     hide($content['comments']); <?php print render($content['comments']);     hide($content['links']); ?>.     print render($content);
  • 18. 1 2 3 4 5 6 7 8 9 a (metric) tonne of core markup cleanup
  • 20. Core Cleanup • left/right sidebars now first/second
  • 21. Core Cleanup • left/right sidebars now first/second • $closure becomes $page_bottom, new $page_top and hidden regions
  • 22. Core Cleanup • left/right sidebars now first/second • $closure becomes $page_bottom, new $page_top and hidden regions • Renamed $block->content to $content in block.tpl.php
  • 23. Core Cleanup • left/right sidebars now first/second • $closure becomes $page_bottom, new $page_top and hidden regions • Renamed $block->content to $content in block.tpl.php • Browser-targeted CSS files can and should be added using drupal_add_css()
  • 24. Core Cleanup • left/right sidebars now first/second • $closure becomes $page_bottom, new $page_top and hidden regions • Renamed $block->content to $content in block.tpl.php • Browser-targeted CSS files can and should be added using drupal_add_css() • Changes to alt and title attribute for the RSS feed icon
  • 26. Core Cleanup pt deux • $picture changes to $user_picture, and the CSS class 'picture' to 'user-picture'
  • 27. Core Cleanup pt deux • $picture changes to $user_picture, and the CSS class 'picture' to 'user-picture' • System module stylesheets have been reorganized to separate behavior-supportingstyles from presentational styles
  • 28. Core Cleanup pt deux • $picture changes to $user_picture, and the CSS class 'picture' to 'user-picture' • System module stylesheets have been reorganized to separate behavior-supportingstyles from presentational styles • clear-block --> .clearfix (yay!)
  • 29. Core Cleanup pt deux • $picture changes to $user_picture, and the CSS class 'picture' to 'user-picture' • System module stylesheets have been reorganized to separate behavior-supportingstyles from presentational styles • clear-block --> .clearfix (yay!) • Search box moved from theme layer to blocks
  • 30. Core Cleanup pt deux • $picture changes to $user_picture, and the CSS class 'picture' to 'user-picture' • System module stylesheets have been reorganized to separate behavior-supportingstyles from presentational styles • clear-block --> .clearfix (yay!) • Search box moved from theme layer to blocks and many more
  • 31. 1 2 3 4 5 6 7 8 9 PHPTemplate suggestion wildcards
  • 32. template wildcards • page--user--%.tpl.php theme for any user display page • page--user--%--edit.tpl.php for any user edit page (double dashes, hat tip to @merlinofchaos)
  • 33. 1 2 3 4 5 6 7 8 9 Cool Accessibility changes!
  • 34. new accessibility changes in D7 • New classes available to hide content in an accessible manner • .element-invisible • .element-hidden • Added markup to make installation task progress perceivable with screen-reader and CSS disabled. • theme_links() has a new parameter $heading for accessibility • Add an invisible heading to theme_breadcrumb() • Skip to main content links in core themes
  • 35. 1 2 3 4 5 6 7 8 9 very little new work in migrating your D6 themes to D7
  • 36. OMG less work RAWKS!
  • 37. 1 2 3 4 5 6 7 8 9 preprocess can be used for any theming hook. (templates and functions)
  • 38. 1 2 3 4 5 6 7 8 9 new hooks available
  • 39. new D7 hook functions • hook_page_alter • hook_form_alter • hook_js_alter • hook_css_alter
  • 41. hook_page_alter(&$page) allows you to change any element on the page prior to being rendered.
  • 42. hook_page_alter is covered in kickass and smothered in awesomesauce.
  • 44. So what’s this all mean?
  • 45. When D7 ships, only one thing will stop you from making kickass themes...
  • 46. You.

Notas do Editor

  1. 1 Content is now a block (!) Huge because now you can put content wherever you want on the page, and change that based on using things like panels, context, spaces, etc.
  2. Jquery UI in core. so, if you want all the jquery goodness that UI module provides, it&amp;#x2019;s just right there, ready for you when you start theming.
  3. Variables can now be hidden and shown later to give you more flexibility about when and where to render.