SlideShare a Scribd company logo
1 of 8
Drupal 8 Theming
Templating
First step
• First we need to create a THEMENAME.info.yml file
to craete a new theme.
• This file provides the metadata about the new
theme.
THEMENAME.info.yml
• 4 required meta information
 Name
 Description
 Type
 Core
Some additional meta info which can be added :
 Libraries
 Stylesheet-remove
 Regions
THEMENAME.info.yml
• name: Fluffiness
• description: First custom theme for drupal8
• type: theme
• core: 8.x
• stylesheets-remove:
- core/assets/vendor/normalize-css/normalize.css
• libraries:
- fluffiness/global-styling
• regions:
header: 'Header'
content: 'Content'
page_top: 'Pag Top'
page_bottoml: 'Page Bottom'
footer: 'footer'
Libraries
• No stylesheets property
• No scripts property
• jQuery is not automatically loaded on all pages anymore in Drupal 8
• To define your asset libraries you need to add THEMENAME.libraries.yml
In this library yml file we can add the required css/js files as below eg:
cuddly-slider:
version: 1.x
css:
theme:
css/cuddly-slider.css: {}
js:
js/cuddly-slider.js: {}
dependencies:
- core/jquery
regions
• To add a region to a theme there are 2 require steps :
 Adding region metadata to your THEMENAME.info.yml
 print that new region into the page.html.twig file.
For example :
region :
header_top : Header Top
Print this new region in your twig template
{{page.header_top}}
Default Regions
1. page.header: Items for the header region.
2. page.primary_menu: Items for the primary menu region.
3. page.secondary_menu: Items for the secondary menu region.
4. page.highlighted: Items for the highlighted content region.
5. page.help: Dynamic help text, mostly for admin pages.
6. page.content: The main content of the current page.
7. page.sidebar_first: Items for the first sidebar.
8. page.sidebar_second: Items for the second sidebar.
9. page.footer: Items for the footer region.
10. page.breadcrumb: Items for the breadcrumb region.
These are 10 default regions coming from base theme classic.
Twig templates
• page.html.twig
• html.html.twig

More Related Content

What's hot

WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2Mizanur Rahaman Mizan
 
WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme DevelopmentSantosh Kunwar
 
Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management SystemsMatthew Turland
 
WordPress Template hierarchy
WordPress Template hierarchyWordPress Template hierarchy
WordPress Template hierarchyJason Yingling
 
WordPress Template Hierarchy
WordPress Template HierarchyWordPress Template Hierarchy
WordPress Template HierarchySarah Whinnem
 
Data cache management in php
Data cache management in phpData cache management in php
Data cache management in phpAndrew Yatsenko
 
Drupal Multisite Setup
Drupal Multisite SetupDrupal Multisite Setup
Drupal Multisite Setupipsitamishra
 
Drupal Multisite
Drupal MultisiteDrupal Multisite
Drupal MultisitePeter Arato
 
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 ThemeSuzanne Dergacheva
 
Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsLuís Carneiro
 

What's hot (14)

Drupal Multi-site for Fun and Profit
Drupal Multi-site for Fun and ProfitDrupal Multi-site for Fun and Profit
Drupal Multi-site for Fun and Profit
 
WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2
 
WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme Development
 
Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management Systems
 
WordPress Template hierarchy
WordPress Template hierarchyWordPress Template hierarchy
WordPress Template hierarchy
 
WordPress Template Hierarchy
WordPress Template HierarchyWordPress Template Hierarchy
WordPress Template Hierarchy
 
Data cache management in php
Data cache management in phpData cache management in php
Data cache management in php
 
A Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 MinutesA Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 Minutes
 
Drupal Multisite Setup
Drupal Multisite SetupDrupal Multisite Setup
Drupal Multisite Setup
 
Drupal Multisite
Drupal MultisiteDrupal Multisite
Drupal Multisite
 
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
 
Design todevelop
Design todevelopDesign todevelop
Design todevelop
 
Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First Steps
 
PHP Includes
PHP IncludesPHP Includes
PHP Includes
 

Viewers also liked (14)

4t A SG-Barcelona
4t A SG-Barcelona4t A SG-Barcelona
4t A SG-Barcelona
 
Martin Junker - Media PR
Martin Junker - Media PRMartin Junker - Media PR
Martin Junker - Media PR
 
Finebearings
FinebearingsFinebearings
Finebearings
 
Introduction to Grid Generation
Introduction to Grid GenerationIntroduction to Grid Generation
Introduction to Grid Generation
 
Partes de la cara
Partes de la caraPartes de la cara
Partes de la cara
 
Clasicismo y concreto armado fm
Clasicismo y concreto armado fmClasicismo y concreto armado fm
Clasicismo y concreto armado fm
 
Blessings From Scripture Study
Blessings From Scripture StudyBlessings From Scripture Study
Blessings From Scripture Study
 
Mobile App Security: A Review
Mobile App Security: A ReviewMobile App Security: A Review
Mobile App Security: A Review
 
Plagio
PlagioPlagio
Plagio
 
Sistemasdeinformación
SistemasdeinformaciónSistemasdeinformación
Sistemasdeinformación
 
Admision 2017 18
Admision 2017 18Admision 2017 18
Admision 2017 18
 
Euglenoidne alge
Euglenoidne algeEuglenoidne alge
Euglenoidne alge
 
Bacillariophyta
BacillariophytaBacillariophyta
Bacillariophyta
 
Propuesta mejoramiento organizacional
Propuesta mejoramiento organizacionalPropuesta mejoramiento organizacional
Propuesta mejoramiento organizacional
 

Similar to Drupal 8 theming

Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for DevelopersIan Carnaghan
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentsparkfabrik
 
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)Drupaltour
 
Keycloak theme customization
Keycloak theme customizationKeycloak theme customization
Keycloak theme customizationRavi Yasas
 
PSD to Drupal - Introductory Drupal Theming
PSD to Drupal - Introductory Drupal ThemingPSD to Drupal - Introductory Drupal Theming
PSD to Drupal - Introductory Drupal Themingsheenadonnelly
 
Drupal8 themingdeepdive drupaldevdays-montpellier17042015
Drupal8 themingdeepdive drupaldevdays-montpellier17042015Drupal8 themingdeepdive drupaldevdays-montpellier17042015
Drupal8 themingdeepdive drupaldevdays-montpellier17042015Romain Jarraud
 
Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)Eugenio Minardi
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend developmentsparkfabrik
 
WortdPress Child themes: Why and How
WortdPress Child themes: Why and HowWortdPress Child themes: Why and How
WortdPress Child themes: Why and HowPaul Bearne
 
Drupal 8: Theming. Lviv Drupal Cafe #4
Drupal 8: Theming. Lviv Drupal Cafe #4Drupal 8: Theming. Lviv Drupal Cafe #4
Drupal 8: Theming. Lviv Drupal Cafe #4Pavel Shevchuk
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To DrupalLauren Roth
 
Drupal Theming An Introduction
Drupal Theming   An IntroductionDrupal Theming   An Introduction
Drupal Theming An IntroductionLauren Roth
 
Drupal 8 theming deep dive
Drupal 8 theming deep diveDrupal 8 theming deep dive
Drupal 8 theming deep diveRomain Jarraud
 
Themes and layouts
Themes and layoutsThemes and layouts
Themes and layoutsAbhishekSRC
 
Drupal7 themeing changes and inheritence
Drupal7 themeing changes and inheritenceDrupal7 themeing changes and inheritence
Drupal7 themeing changes and inheritenceAimee Maree Forsstrom
 
Theming Drupal 6 - An Introduction to the Basics
Theming Drupal 6 - An Introduction to the BasicsTheming Drupal 6 - An Introduction to the Basics
Theming Drupal 6 - An Introduction to the BasicsErik Baldwin
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Typesheatherrumd
 

Similar to Drupal 8 theming (20)

Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for Developers
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend development
 
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
DrupalTour Lviv — Theming in Drupal8 (Ivan Tibezh, InternetDevels)
 
Keycloak theme customization
Keycloak theme customizationKeycloak theme customization
Keycloak theme customization
 
PSD to Drupal - Introductory Drupal Theming
PSD to Drupal - Introductory Drupal ThemingPSD to Drupal - Introductory Drupal Theming
PSD to Drupal - Introductory Drupal Theming
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
 
Drupal8 themingdeepdive drupaldevdays-montpellier17042015
Drupal8 themingdeepdive drupaldevdays-montpellier17042015Drupal8 themingdeepdive drupaldevdays-montpellier17042015
Drupal8 themingdeepdive drupaldevdays-montpellier17042015
 
Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
 
WortdPress Child themes: Why and How
WortdPress Child themes: Why and HowWortdPress Child themes: Why and How
WortdPress Child themes: Why and How
 
Drupal 8: Theming. Lviv Drupal Cafe #4
Drupal 8: Theming. Lviv Drupal Cafe #4Drupal 8: Theming. Lviv Drupal Cafe #4
Drupal 8: Theming. Lviv Drupal Cafe #4
 
D8 training
D8 trainingD8 training
D8 training
 
Drupal 6 Theming
Drupal 6 ThemingDrupal 6 Theming
Drupal 6 Theming
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Drupal Theming An Introduction
Drupal Theming   An IntroductionDrupal Theming   An Introduction
Drupal Theming An Introduction
 
Drupal 8 theming deep dive
Drupal 8 theming deep diveDrupal 8 theming deep dive
Drupal 8 theming deep dive
 
Themes and layouts
Themes and layoutsThemes and layouts
Themes and layouts
 
Drupal7 themeing changes and inheritence
Drupal7 themeing changes and inheritenceDrupal7 themeing changes and inheritence
Drupal7 themeing changes and inheritence
 
Theming Drupal 6 - An Introduction to the Basics
Theming Drupal 6 - An Introduction to the BasicsTheming Drupal 6 - An Introduction to the Basics
Theming Drupal 6 - An Introduction to the Basics
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Types
 

Recently uploaded

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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
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
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Recently uploaded (20)

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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
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
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Drupal 8 theming

  • 2. First step • First we need to create a THEMENAME.info.yml file to craete a new theme. • This file provides the metadata about the new theme.
  • 3. THEMENAME.info.yml • 4 required meta information  Name  Description  Type  Core Some additional meta info which can be added :  Libraries  Stylesheet-remove  Regions
  • 4. THEMENAME.info.yml • name: Fluffiness • description: First custom theme for drupal8 • type: theme • core: 8.x • stylesheets-remove: - core/assets/vendor/normalize-css/normalize.css • libraries: - fluffiness/global-styling • regions: header: 'Header' content: 'Content' page_top: 'Pag Top' page_bottoml: 'Page Bottom' footer: 'footer'
  • 5. Libraries • No stylesheets property • No scripts property • jQuery is not automatically loaded on all pages anymore in Drupal 8 • To define your asset libraries you need to add THEMENAME.libraries.yml In this library yml file we can add the required css/js files as below eg: cuddly-slider: version: 1.x css: theme: css/cuddly-slider.css: {} js: js/cuddly-slider.js: {} dependencies: - core/jquery
  • 6. regions • To add a region to a theme there are 2 require steps :  Adding region metadata to your THEMENAME.info.yml  print that new region into the page.html.twig file. For example : region : header_top : Header Top Print this new region in your twig template {{page.header_top}}
  • 7. Default Regions 1. page.header: Items for the header region. 2. page.primary_menu: Items for the primary menu region. 3. page.secondary_menu: Items for the secondary menu region. 4. page.highlighted: Items for the highlighted content region. 5. page.help: Dynamic help text, mostly for admin pages. 6. page.content: The main content of the current page. 7. page.sidebar_first: Items for the first sidebar. 8. page.sidebar_second: Items for the second sidebar. 9. page.footer: Items for the footer region. 10. page.breadcrumb: Items for the breadcrumb region. These are 10 default regions coming from base theme classic.