SlideShare uma empresa Scribd logo
1 de 31
GETTING STARTED WITH
DRUPAL 8THEMING
Suzanne Dergacheva
@suzanne_kennedy
Drupal Consulting, Development, andTraining
evolvingweb.ca
Suzanne Dergacheva, Co-founder
@suzanne_kennedy
TRAINING PROGRAM
evolvingweb.ca/training
UPCOMINGTRAININGS
• Intro to Drupal inToronto - May 5
• Panels inToronto - May 6
• Intro to Drupal in Ottawa - May 21
• Drupal Site Building in Ottawa - May 22-23
• Views in Austin - June 2
• WxT-Drupal Site Building - June 12-13
• Drupal Module Development - June 19-20
http://evolvingweb.ca/training
OVERVIEW
WHAT’S NEW?
Twig
WHAT’S GONE?
• Theme functions not used (use templates instead)
• Process functions
• Regions and blocks
• Preprocess functions
WHAT’STHE SAME?
WHAT DOES IT LOOK LIKE?
WHAT DOES IT LOOK LIKE?
.info file
.THEME FILE
NODE.HTML.TWIG
NEWTEMPLATES
SYSTEMTEMPLATES
core/modules/system/templates
BREADCRUMBTEMPLATE
core/modules/system/templates/
breadcrumb.html.twig
TWIGTEMPLATES
PRINTINGVARIABLES
{{ content.links }}
{{ user_picture }}
SOMETIMES
{{ item['#item'].alt }}
HIDE/SHOW
{{ content|without('links') }}
{{ content.links }}
{{ content.links }}
CREATEVARIABLES
{% set date = node.created|format_date('medium') %}
CONDITIONALS
{% if not page %}
{{ label }}
{% endif %}
CONDITIONALS
{%- for item in items -%}
{{ item.value }}
{%- endfor -%}
REGIONS
{% if page.sidebar_second %}
<aside class="l-sidebar-second" role="complementary">
{{ page.sidebar_second }}
</aside>
{% endif %}
{{ page.content }}
TRANSLATION
{{ 'Home'|t }}
{% trans %}
Some text at the top of the node.
{% endtrans %}
TRANSLATION WITH
VARIABLES
{% trans %}
By {{ author.username }} on {{ node.created }}
{% endtrans %}
By @username on @created
COMMENTS
{# this is a comment #}
ATTRIBUTES
<article id="node-{{ node.id }}"
class="{{ attributes.class }} clearfix"
{{ attributes|without('id', 'class') }}>
PARTIALS
{% extends '@drupalcamp/node.html.twig' %}
{% block nodeheader %}
<p>This is an article node.</p>
{% endblock %}
node--article.html.twig
{% block nodeheader %}
<p>This is a generic node.</p>
{% endblock %}
node.html.twig
SETTINGS.PHP
$settings['twig_debug'] =TRUE;
$settings['twig_auto_reload'] =TRUE;
DOCUMENTATION
• How to useTwig:
• http://twig.sensiolabs.org/documentation
Drupal Consulting, Development, andTraining
evolvingweb.ca
Suzanne Kennedy, Co-founder
@suzanne_kennedy

Mais conteúdo relacionado

Mais procurados

From a Fireworks Comp to a Genesis Child Theme, Step by Step
From a Fireworks Comp to a Genesis Child Theme, Step by StepFrom a Fireworks Comp to a Genesis Child Theme, Step by Step
From a Fireworks Comp to a Genesis Child Theme, Step by Step
East Bay WordPress Meetup
 
Yahoo! Search monkey API - CEBIT 2008
Yahoo! Search monkey API - CEBIT 2008Yahoo! Search monkey API - CEBIT 2008
Yahoo! Search monkey API - CEBIT 2008
Eric D.
 

Mais procurados (10)

Face/Off: APEX Templates & Themes
Face/Off: APEX Templates & ThemesFace/Off: APEX Templates & Themes
Face/Off: APEX Templates & Themes
 
Get the Look and Feel You Want in Oracle APEX
Get the Look and Feel You Want in Oracle APEXGet the Look and Feel You Want in Oracle APEX
Get the Look and Feel You Want in Oracle APEX
 
From a Fireworks Comp to a Genesis Child Theme, Step by Step
From a Fireworks Comp to a Genesis Child Theme, Step by StepFrom a Fireworks Comp to a Genesis Child Theme, Step by Step
From a Fireworks Comp to a Genesis Child Theme, Step by Step
 
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeMinimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
 
Spsbe using js-linkanddisplaytemplates
Spsbe   using js-linkanddisplaytemplatesSpsbe   using js-linkanddisplaytemplates
Spsbe using js-linkanddisplaytemplates
 
Yahoo! Search monkey API - CEBIT 2008
Yahoo! Search monkey API - CEBIT 2008Yahoo! Search monkey API - CEBIT 2008
Yahoo! Search monkey API - CEBIT 2008
 
Intro to the Office UI Fabric
Intro to the Office UI FabricIntro to the Office UI Fabric
Intro to the Office UI Fabric
 
How to make prototype with JustProto
How to make prototype with JustProtoHow to make prototype with JustProto
How to make prototype with JustProto
 
Becoming a more productive Rails Developer
Becoming a more productive Rails DeveloperBecoming a more productive Rails Developer
Becoming a more productive Rails Developer
 
Untangling spring week6
Untangling spring week6Untangling spring week6
Untangling spring week6
 

Semelhante a Getting Started with Drupal 8 Theming - DrupalCamp Toronto 2014

Scale Conference "Intro to Drupal" Douglas C. Hoffman
Scale Conference "Intro to Drupal" Douglas C. HoffmanScale Conference "Intro to Drupal" Douglas C. Hoffman
Scale Conference "Intro to Drupal" Douglas C. Hoffman
Doug Hoffman
 
Introduction to Drupal Content Management System
Introduction to Drupal Content Management SystemIntroduction to Drupal Content Management System
Introduction to Drupal Content Management System
Mario Hernandez
 
PHP IDEs with Drupal: DrupalCon Austin 2014
PHP IDEs with Drupal: DrupalCon Austin 2014PHP IDEs with Drupal: DrupalCon Austin 2014
PHP IDEs with Drupal: DrupalCon Austin 2014
Valery Lourie
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7
Ivan Zugec
 
PPPA D8 presentation Drupal For Gov_0
PPPA D8 presentation Drupal For Gov_0PPPA D8 presentation Drupal For Gov_0
PPPA D8 presentation Drupal For Gov_0
Stan Ascher
 

Semelhante a Getting Started with Drupal 8 Theming - DrupalCamp Toronto 2014 (20)

Drupal 8 Adoption Myths Debunked
Drupal 8 Adoption Myths DebunkedDrupal 8 Adoption Myths Debunked
Drupal 8 Adoption Myths Debunked
 
An absolute beginner’s guide to the drupal universe
An absolute beginner’s guide to the drupal universeAn absolute beginner’s guide to the drupal universe
An absolute beginner’s guide to the drupal universe
 
Scale Conference "Intro to Drupal" Douglas C. Hoffman
Scale Conference "Intro to Drupal" Douglas C. HoffmanScale Conference "Intro to Drupal" Douglas C. Hoffman
Scale Conference "Intro to Drupal" Douglas C. Hoffman
 
Evolution of NuGet
Evolution of NuGetEvolution of NuGet
Evolution of NuGet
 
Drupal 8 Initiatives
Drupal 8 InitiativesDrupal 8 Initiatives
Drupal 8 Initiatives
 
Introduction to Drupal Content Management System
Introduction to Drupal Content Management SystemIntroduction to Drupal Content Management System
Introduction to Drupal Content Management System
 
Drupal Developer Days Keynote
Drupal Developer Days KeynoteDrupal Developer Days Keynote
Drupal Developer Days Keynote
 
Drupal session 1 - What are drupal sessions?
Drupal session 1 - What are drupal sessions?Drupal session 1 - What are drupal sessions?
Drupal session 1 - What are drupal sessions?
 
PHP IDEs with Drupal: DrupalCon Austin 2014
PHP IDEs with Drupal: DrupalCon Austin 2014PHP IDEs with Drupal: DrupalCon Austin 2014
PHP IDEs with Drupal: DrupalCon Austin 2014
 
LITA Preconference: Getting Started with Drupal (handout)
LITA Preconference: Getting Started with Drupal (handout)LITA Preconference: Getting Started with Drupal (handout)
LITA Preconference: Getting Started with Drupal (handout)
 
Drupal for beginners - Global Training Days - Cebu 2016
Drupal for beginners - Global Training Days - Cebu 2016Drupal for beginners - Global Training Days - Cebu 2016
Drupal for beginners - Global Training Days - Cebu 2016
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7
 
Drupal
DrupalDrupal
Drupal
 
Drupal for rlace
Drupal for rlaceDrupal for rlace
Drupal for rlace
 
Workflow Initiative Update
Workflow Initiative UpdateWorkflow Initiative Update
Workflow Initiative Update
 
History of Drupal: From Drop 1.0 to Drupal 8
History of Drupal: From Drop 1.0 to Drupal 8History of Drupal: From Drop 1.0 to Drupal 8
History of Drupal: From Drop 1.0 to Drupal 8
 
PPPA D8 presentation Drupal For Gov_0
PPPA D8 presentation Drupal For Gov_0PPPA D8 presentation Drupal For Gov_0
PPPA D8 presentation Drupal For Gov_0
 
Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to Drupal
 
Phase2 Large Drupal Multisites (gta case study)
Phase2   Large Drupal Multisites (gta case study)Phase2   Large Drupal Multisites (gta case study)
Phase2 Large Drupal Multisites (gta case study)
 

Mais de Suzanne Dergacheva

10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box
Suzanne Dergacheva
 

Mais de Suzanne Dergacheva (20)

It's All About the Experience: What I’ve learnt from talking to thousands of ...
It's All About the Experience: What I’ve learnt from talking to thousands of ...It's All About the Experience: What I’ve learnt from talking to thousands of ...
It's All About the Experience: What I’ve learnt from talking to thousands of ...
 
Building a Great User Experience for Content Editors in Drupal 8
Building a Great User Experience for Content Editors in Drupal 8Building a Great User Experience for Content Editors in Drupal 8
Building a Great User Experience for Content Editors in Drupal 8
 
Dipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module DevelopmentDipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module Development
 
Device-Agnostic Content Strategy for Drupal
Device-Agnostic Content Strategy for DrupalDevice-Agnostic Content Strategy for Drupal
Device-Agnostic Content Strategy for Drupal
 
Creating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - WebinarCreating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - Webinar
 
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech DayCreating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
 
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreCreating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
 
What is Drupal? And Why is it Useful? Webinar
What is Drupal? And Why is it Useful? WebinarWhat is Drupal? And Why is it Useful? Webinar
What is Drupal? And Why is it Useful? Webinar
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
 
What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and Gotchas
 
Migrate for Site Builders from MidCamp 2016
Migrate for Site Builders from MidCamp 2016Migrate for Site Builders from MidCamp 2016
Migrate for Site Builders from MidCamp 2016
 
The Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualThe Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 Multilingual
 
Creating a Drupal Install Profile for a Large Organization
Creating a Drupal Install Profile for a Large OrganizationCreating a Drupal Install Profile for a Large Organization
Creating a Drupal Install Profile for a Large Organization
 
Intro to Drupal Migrate for Site Builders
Intro to Drupal Migrate for Site BuildersIntro to Drupal Migrate for Site Builders
Intro to Drupal Migrate for Site Builders
 
Drupal migrate-june2015
Drupal migrate-june2015Drupal migrate-june2015
Drupal migrate-june2015
 
10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box
 
DrupalCamp NYC Panels Presentation - April 2014
DrupalCamp NYC Panels Presentation - April 2014DrupalCamp NYC Panels Presentation - April 2014
DrupalCamp NYC Panels Presentation - April 2014
 
Using Panels Wisely - DrupalCamp Ottawa 2014
Using Panels Wisely - DrupalCamp Ottawa 2014Using Panels Wisely - DrupalCamp Ottawa 2014
Using Panels Wisely - DrupalCamp Ottawa 2014
 
Introduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience ToolkitIntroduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience Toolkit
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
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...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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...
 
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
 
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...
 

Getting Started with Drupal 8 Theming - DrupalCamp Toronto 2014