SlideShare a Scribd company logo
Made with drupal 8
WHO WE ARE
Leolando Tan,
Front end developer, Promet Source
Mary Chris Casis,
Junior Front end developer, Webizat
Luc Bezier,
Freelance & Consultant Drupal,
Promet Source / Webizat
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 2
SUMMARY
● Project overview
● Why start with Drupal 8 Beta?
● Site building
● Theming
● Configuration Manager
● Custom Module
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 3
THE PROJECT
Drupalcamp Cebu 2015 website.
Sessions, Speakers, Venue info, Event info, Sponsors ...
Open Source: https://github.com/promet/drupalcampcebu2015/
Live at https://2015.drupalcebu.org
Development partially sponsored by Promet Source and Webizat.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 4
THE PROJECT
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 5
https://github.com/promet/drupalcampcebu2015/
DRUPAL-8-BETA-12
Project started with Beta-12. Beta-12 was:
- An Early version.
- Unstable. A version for development, not production.
- Over 20 known critical issues with this beta release.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 6
WHY START WITH DRUPAL 8 BETA?
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 7
WHY WE USED DRUPAL 8 BETA
New features and improvements (more than 200 in total).
Project is not critical.
Project can be done using core alone (no contributed modules).
No data to migrate.
We would go live on RC1, not beta.
Great opportunity to learn and share.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 8
DRUPAL-8-BETA-12
Project started in July, using Drupal 8 beta 12.
Beta 12 & 13, our goal :
Create configuration and share it with other developers.
Thanks “vagrant” …
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 9
OUR BETA TO RC JOURNEY
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 10
BETA-14
THEMING
BETA-12 & 13
SETUP
Configuration
management.
OUR BETA TO RC JOURNEY
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 11
BETA-14
THEMING
BETA-15 & 16
TROUBLES
No beta to beta
updates from Beta-
14.
BETA-12 & 13
SETUP
Configuration
management.
OUR BETA TO RC JOURNEY
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 12
BETA-14
THEMING
BETA-15 & 16
TROUBLES
No beta to beta
updates from Beta-
14.
RC1
LIVE
We go Live and
Open Source
RC2 & RC3
PROJECT
IMPROVEMENTS
Life is good !
BETA-12 & 13
SETUP
Configuration
management.
SITE BUILDING
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 13
CONTRIB TO D8 CORE
Breakpoint CacheTags
Content Translation Email
Entity File Entity
Link Phone
Picture Quick Edit
Transliteration UUID
Views / CTools RESTWS (REST)
CKEditor Date
Display Suite (view modes) Internationalization
Migrate
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 14
CONTRIB TO D8 CORE
CKEditor
Finally a great wysiwyg
integration out of
the box.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 15
Adding the image
button
Automatically
adds the plugin
settings
D7 CORE TO CONTRIB
Blog
Dashboard
PHP Filter
Poll
XML-RPC
RIP : Overlay
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 16
D7 CORE TO CONTRIB
Overlay in Drupal 7 - Removed in Drupal 8
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 17
NEW FIELDS TYPE IN CORE
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 18
Telephone
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 19
Uses HTML5 input form field for
telephone field.
Mobile-friendly
SAVING PAGES IN D8
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 20
PLACING BLOCKS
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 21
Assign blocks to a
region using
“place block”.
Nothing in
disabled blocks by
default.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 22
PLACING BLOCKS
Finally, out of the box you can place
the same block on two regions !
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 23
PLACING BLOCKS
Visibility settings when a
block is being placed on a
region.
With drupal 7 core you
would set that setting
once, directly on the block.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 24
Adding fields directly on the custom block, like a content type.
CUSTOM BLOCK LIBRARY
THEMING
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 25
26
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015
CREATING A SUB-THEME
Place themes in the ‘themes/custom’ folder.
BOOSTRAP THEME IN DRUPAL 8
Started our theme on D8 beta versions,
no boostrap theme for D8 yet.
The community pledged to release Bootstrap
theme for Drupal-8.0.0
drupal.org/project/bootstrap
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 27
OUR THEME SOLUTION
Classy +
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 28
LIBRARIES.YML EXAMPLE
cuddly-slider:
version: 1.x
css:
theme:
css/cuddly-slider.css: {}
js:
js/cuddly-slider.js: {}
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 29
LIBRARIES.YML - CSS EXAMPLE
+ css
+ base
- normalize.css
+ layout
- layout.css
- layout--medium.css
- layout--wide.css
+ components
- button.css
+ theme
- theme--light.css
- theme--dark.css
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 30
LIBRARIES.YML - JS
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 31
QUESTION, BUG OR NOT?
Started theming from Beta 14.
Our theme is a sub theme of Classy.
In beta 16, we implemented the libraries, but not javascript is coming
up. We checked several times, but it doesn’t work.
What is going on ? Bug or not ?
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 32
INJECT YOUR CSS AND JAVASCRIPT
Not a bug.
Learn the hard way, if you want JS, in <head> inside html.html.twig
you will need :
<js-placeholder token="{{ placeholder_token|raw }}">
Classy theme does not use javascript,
no JS injection in the template in beta-14. It came later on in classy.
We found that line when Classy got updated, on beta-16.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 33
LIBRARIES.YML
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 34
LIBRARIES.YML
Note the dependencies with Drupal core javascript.
- core/DrupalSettings
It lets us use the settings variables in Drupal behaviors.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 35
JAVASCRIPT IN DRUPAL 8
The “ok it works” method
$(document).ready(function () {
// Do some fancy stuff.
});
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 36
JAVASCRIPT IN DRUPAL 8
The right way.
Drupal.behaviors(drupalSettings)
.once()
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 37
JAVASCRIPT IN DRUPAL 8
Drupal.behaviors.myBehavior = {
attach: function (context, settings) {
$('input.myCustomBehavior',context)
.once('myCustomBehavior').addClass('processed');
}
};
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 38
TWIG DEBUGGING, ACTIVATE
sites/default/services.yml
parameters:
twig.config:
debug: true
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 39
TWIG DEBUGGING, RESULT IN HTML
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'node' -->
<!-- FILE NAME SUGGESTIONS:
* node--view--frontpage--page-1.html.twig
* node--view--frontpage.html.twig
* node--1--teaser.html.twig
* node--1.html.twig
* node--article--teaser.html.twig
* node--article.html.twig
* node--teaser.html.twig
x node.html.twig
-->
<!-- BEGIN OUTPUT from 'core/themes/classy/templates/content/node.html.twig' -->
<article>....</article>
<!-- END OUTPUT from 'core/themes/classy/templates/content/node.html.twig' -->
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 40
TWIG DEBUGGING, DEVEL KINT MODULE
Debug all the variables:
{{ kint() }}
Debug an object or array:
{{ kint(page.content) }}
For special characters (like #), use this:
{{ kint(page[“#content_two”]) }}
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 41
TWIG DEBUGGING
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 42
CONFIGURATION
MANAGER
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 43
FEATURES MODULE IN DRUPAL 7
Features is a contributed module to group components from modules
together in a single feature module.
What we are supposed to do with features:
Group together functionalities to answer a specific use case.
What we really do with the features module in Drupal 7:
We build a complex deployment system to synchronize environments.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 44
DRUPAL 8 CONFIGURATION MANAGER
The configuration manager module stores all the configuration of your
project as yaml files.
Made to synchronize environments and helps to manage complexity.
Those yaml files are :
- Small: Reduces conflicts.
- Organized: They follow a naming standards and structure.
- Separate: Sites own a configuration, not modules.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 45
DRUSH COMMANDS FOR CONFIGURATION
Export your configuration:
$ drush cex
Import your configuration:
$ drush cim
Those commands import / export all your configuration.
Use GIT to select which yaml configuration you really want to update
and share.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 46
DRUPAL 8 CONFIGURATION MANAGER
The configuration manager is not made to share configuration across
several projects. Your site owns a configuration.
To use the configuration in different environments of the same project,
they will need the same Universally Unique IDentifier (UUID).
Drush command to know your project’s UUID:
$ drush cget system.site
To edit the UUID:
$ drush cedit system.site
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 47
BETA ISSUES
During the beta development, the variable name to synchronize the
configuration changed, from “staging” to “sync”, causing us some issues.
You will now set your configuration folder like :
$config_directories['sync'] = './../config/sync';
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 48
QUESTION, BUG OR NOT?
We deleted a field.
The system deleted a view at the same time.
We checked the view using the UI, that specific field was not used in
the view.
What happened ? Bug or not ?
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 49
NOT A BUG, IT’S DEPENDENCY
The fields were in the
master display of the view,
but not in any current
display.
Overridden by all displays
in the view, we could not
see the field in Views UI.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 50
Dependency. Deleting a field, used in a view, would delete that view.
CUSTOM MODULE
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 51
MODULES ARCHITECTURE
Description of your module is now a yaml file.
We still used a “.module” file.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 52
CUSTOM MODULE WITH FORM API
Form API is pretty similar as in Drupal 7.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 53
WHAT HAPPENED TO $USER?
Drupal 7:
GLOBAL $user;
Drupal 8:
$user = Drupal::currentUser();
Access the roles like:
$user->getRoles()
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 54
WHY DRUPAL 8 IS FAST?
Out of the box, Drupal 8 is optimized for production.
To develop, you will have some minor changes to do.
Here is the result of our Drupal 8 project, with a basic configuration :
Results from webpagetest.org for 2015.drupalcebu.org few days before the event.
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 55
MORE ABOUT D8 CORE AT DRUPALCAMP CEBU
2:45 PM
5 PM
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 56
All sessions of Drupalcamp Cebu 2015 on 2015.drupalcebu.org/sessions
QUESTIONS ?
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 57
THANK YOU !
Leolando Tan, @leolandotan
https://www.drupal.org/u/leolando.tan
Mary Chris Casis, @casismary
https://www.drupal.org/u/casism
Luc Bezier, @Luukyb
https://www.drupal.org/u/luukyb
MADE WITH DRUPAL 8
Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 58

More Related Content

PDF
Drupal for beginners - Global Training Days - Cebu 2016
PDF
Collaborating with the Community
ODP
Drupal
PDF
Introduction to Drupal, Wayne Eaker, Nov 11, 09
PDF
What is Drupal? An Introduction to Drupal 8
ODP
Introducing Drupal and Drupal.Org Community in PUP QC, PH
PDF
WebGeek AppNimbus (Nikko Bautista)
PDF
State of Drupal keynote, DrupalCon Baltimore
Drupal for beginners - Global Training Days - Cebu 2016
Collaborating with the Community
Drupal
Introduction to Drupal, Wayne Eaker, Nov 11, 09
What is Drupal? An Introduction to Drupal 8
Introducing Drupal and Drupal.Org Community in PUP QC, PH
WebGeek AppNimbus (Nikko Bautista)
State of Drupal keynote, DrupalCon Baltimore

What's hot (20)

PDF
State of Drupal keynote, DrupalCon Vienna
PDF
Drupal 8, Don’t Be Late (Enterprise Orgs, We’re Looking at You)
PPT
Drupal 8 - a peek under the hood
PDF
Managing a Project the Drupal Way - Drupal Open Days Ireland
PPTX
How To Win a Hackaton - My thoughts on the WebGeek Devcup
PDF
Drupal 8: Most common beginner mistakes
ODP
Drupal introduction
PDF
Session v1
PDF
State of Drupal keynote, DrupalCon Dublin
PPT
Drupal A non technical Introduction
PDF
Fastest Way to DRUPAL
PDF
DrupalCon Austin - Absolute Beginner's Guide to Drupal
PPTX
EdTechJoker Spring 2020 - Lecture 7 Drupal intro
PPTX
Complex Content Structures and Workflow with Drupal
PDF
Preventing Drupal Headaches: Content Type Checklist
ZIP
Improving Drupal's Page Loading Performance
PPTX
Top 20 mistakes you will make on your 1st Drupal project
PDF
State of Drupal keynote, DrupalCon India
KEY
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
PDF
From 0 to MVP in 40 minutes: decoupled Drupal for startups
State of Drupal keynote, DrupalCon Vienna
Drupal 8, Don’t Be Late (Enterprise Orgs, We’re Looking at You)
Drupal 8 - a peek under the hood
Managing a Project the Drupal Way - Drupal Open Days Ireland
How To Win a Hackaton - My thoughts on the WebGeek Devcup
Drupal 8: Most common beginner mistakes
Drupal introduction
Session v1
State of Drupal keynote, DrupalCon Dublin
Drupal A non technical Introduction
Fastest Way to DRUPAL
DrupalCon Austin - Absolute Beginner's Guide to Drupal
EdTechJoker Spring 2020 - Lecture 7 Drupal intro
Complex Content Structures and Workflow with Drupal
Preventing Drupal Headaches: Content Type Checklist
Improving Drupal's Page Loading Performance
Top 20 mistakes you will make on your 1st Drupal project
State of Drupal keynote, DrupalCon India
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
From 0 to MVP in 40 minutes: decoupled Drupal for startups
Ad

Viewers also liked (19)

PDF
Plain english guide to drupal 8 criticals
PDF
A critique of techno optimism (Alexander 2014) Lecturas recomendadas Samuel M...
PDF
Byline Issue 1 Print
DOC
Taller unidad-0-grado-septimo1
PPT
110629 stack ops - openstack
PDF
CV_Viti_Alberto
PDF
Women in Leadership programs - Cultural Training Asia
PDF
HIRIKILABS How To Make#4 Baliza programable
PPTX
Hydal energy .....Energy obtained by water
PDF
OpenCoesione - Inform network meeting 2016
PPTX
Sidbi an introduction
PPTX
IMPACT OF UNEMPLOYMENT ON GRADUATES` ATTITUDE TOWARDS 1
PPTX
case study on span of managment
PPTX
La Persona como sujeto moral que realiza la Ética - Des.Hum.
PDF
Cómo trabajar las emociones en Educación Emocional
PPTX
Somali resources and government structure
PPT
How to improve your english
PPTX
Sap abap
PPTX
Dificultades del aprendizaje
Plain english guide to drupal 8 criticals
A critique of techno optimism (Alexander 2014) Lecturas recomendadas Samuel M...
Byline Issue 1 Print
Taller unidad-0-grado-septimo1
110629 stack ops - openstack
CV_Viti_Alberto
Women in Leadership programs - Cultural Training Asia
HIRIKILABS How To Make#4 Baliza programable
Hydal energy .....Energy obtained by water
OpenCoesione - Inform network meeting 2016
Sidbi an introduction
IMPACT OF UNEMPLOYMENT ON GRADUATES` ATTITUDE TOWARDS 1
case study on span of managment
La Persona como sujeto moral que realiza la Ética - Des.Hum.
Cómo trabajar las emociones en Educación Emocional
Somali resources and government structure
How to improve your english
Sap abap
Dificultades del aprendizaje
Ad

Similar to Made with drupal 8 (20)

PDF
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
PDF
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
ODP
CiviCRM for Drupal Developers, Site Builders, and Themers
PPTX
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
PPTX
#D8 cx: upgrade your modules to drupal 8
PDF
Building Drupal 8 Sites
PDF
Implementing an Enterprise Design System the Red Hat Way
PDF
Drupal 8 Adoption Myths Debunked
PDF
Choosing Drupal as your Content Management Framework
PPTX
Best Practices for Moving to Drupal 9
PDF
I use drupal / 我是 OO 師,我用 Drupal
PPTX
Dg presentation
PPTX
Drupalcampatl d7
PDF
Drupal training-by-ruchiwebsolutions
PPT
Building Websites of the Future With Drupal 7
PPT
Building Websites of the Future With Drupal 7
PDF
Cloud-Native Builds & Deployments in Bitbucket Pipelines
PDF
Best Practices for Moving to Drupal 9
PDF
Container Camp London (2016-09-09)
PDF
Getting started with Drush
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
CiviCRM for Drupal Developers, Site Builders, and Themers
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8 cx: upgrade your modules to drupal 8
Building Drupal 8 Sites
Implementing an Enterprise Design System the Red Hat Way
Drupal 8 Adoption Myths Debunked
Choosing Drupal as your Content Management Framework
Best Practices for Moving to Drupal 9
I use drupal / 我是 OO 師,我用 Drupal
Dg presentation
Drupalcampatl d7
Drupal training-by-ruchiwebsolutions
Building Websites of the Future With Drupal 7
Building Websites of the Future With Drupal 7
Cloud-Native Builds & Deployments in Bitbucket Pipelines
Best Practices for Moving to Drupal 9
Container Camp London (2016-09-09)
Getting started with Drush

More from Luc Bézier (8)

PDF
Quick guide to Freedom and travels for developers
PDF
Guide to freedom and travels for developers
PDF
The Future of Offices
PDF
Drupal 8 Configuration Management for you and your team
PDF
Introduction to Composer for Drupal
PPTX
Open Source Software, community matters
PPTX
Data migration to Drupal using the migrate module
PPTX
Drupal ladder Cebu : Learn to contribute | November 2013
Quick guide to Freedom and travels for developers
Guide to freedom and travels for developers
The Future of Offices
Drupal 8 Configuration Management for you and your team
Introduction to Composer for Drupal
Open Source Software, community matters
Data migration to Drupal using the migrate module
Drupal ladder Cebu : Learn to contribute | November 2013

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Big Data Technologies - Introduction.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
cuic standard and advanced reporting.pdf
PPT
Teaching material agriculture food technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Network Security Unit 5.pdf for BCA BBA.
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Chapter 3 Spatial Domain Image Processing.pdf
Encapsulation theory and applications.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Big Data Technologies - Introduction.pptx
MYSQL Presentation for SQL database connectivity
cuic standard and advanced reporting.pdf
Teaching material agriculture food technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Diabetes mellitus diagnosis method based random forest with bat algorithm

Made with drupal 8

  • 2. WHO WE ARE Leolando Tan, Front end developer, Promet Source Mary Chris Casis, Junior Front end developer, Webizat Luc Bezier, Freelance & Consultant Drupal, Promet Source / Webizat MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 2
  • 3. SUMMARY ● Project overview ● Why start with Drupal 8 Beta? ● Site building ● Theming ● Configuration Manager ● Custom Module MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 3
  • 4. THE PROJECT Drupalcamp Cebu 2015 website. Sessions, Speakers, Venue info, Event info, Sponsors ... Open Source: https://github.com/promet/drupalcampcebu2015/ Live at https://2015.drupalcebu.org Development partially sponsored by Promet Source and Webizat. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 4
  • 5. THE PROJECT MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 5 https://github.com/promet/drupalcampcebu2015/
  • 6. DRUPAL-8-BETA-12 Project started with Beta-12. Beta-12 was: - An Early version. - Unstable. A version for development, not production. - Over 20 known critical issues with this beta release. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 6
  • 7. WHY START WITH DRUPAL 8 BETA? MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 7
  • 8. WHY WE USED DRUPAL 8 BETA New features and improvements (more than 200 in total). Project is not critical. Project can be done using core alone (no contributed modules). No data to migrate. We would go live on RC1, not beta. Great opportunity to learn and share. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 8
  • 9. DRUPAL-8-BETA-12 Project started in July, using Drupal 8 beta 12. Beta 12 & 13, our goal : Create configuration and share it with other developers. Thanks “vagrant” … MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 9
  • 10. OUR BETA TO RC JOURNEY MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 10 BETA-14 THEMING BETA-12 & 13 SETUP Configuration management.
  • 11. OUR BETA TO RC JOURNEY MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 11 BETA-14 THEMING BETA-15 & 16 TROUBLES No beta to beta updates from Beta- 14. BETA-12 & 13 SETUP Configuration management.
  • 12. OUR BETA TO RC JOURNEY MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 12 BETA-14 THEMING BETA-15 & 16 TROUBLES No beta to beta updates from Beta- 14. RC1 LIVE We go Live and Open Source RC2 & RC3 PROJECT IMPROVEMENTS Life is good ! BETA-12 & 13 SETUP Configuration management.
  • 13. SITE BUILDING MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 13
  • 14. CONTRIB TO D8 CORE Breakpoint CacheTags Content Translation Email Entity File Entity Link Phone Picture Quick Edit Transliteration UUID Views / CTools RESTWS (REST) CKEditor Date Display Suite (view modes) Internationalization Migrate MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 14
  • 15. CONTRIB TO D8 CORE CKEditor Finally a great wysiwyg integration out of the box. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 15 Adding the image button Automatically adds the plugin settings
  • 16. D7 CORE TO CONTRIB Blog Dashboard PHP Filter Poll XML-RPC RIP : Overlay MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 16
  • 17. D7 CORE TO CONTRIB Overlay in Drupal 7 - Removed in Drupal 8 MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 17
  • 18. NEW FIELDS TYPE IN CORE MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 18
  • 19. Telephone MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 19 Uses HTML5 input form field for telephone field. Mobile-friendly
  • 20. SAVING PAGES IN D8 MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 20
  • 21. PLACING BLOCKS MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 21 Assign blocks to a region using “place block”. Nothing in disabled blocks by default.
  • 22. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 22 PLACING BLOCKS Finally, out of the box you can place the same block on two regions !
  • 23. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 23 PLACING BLOCKS Visibility settings when a block is being placed on a region. With drupal 7 core you would set that setting once, directly on the block.
  • 24. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 24 Adding fields directly on the custom block, like a content type. CUSTOM BLOCK LIBRARY
  • 25. THEMING MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 25
  • 26. 26 MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 CREATING A SUB-THEME Place themes in the ‘themes/custom’ folder.
  • 27. BOOSTRAP THEME IN DRUPAL 8 Started our theme on D8 beta versions, no boostrap theme for D8 yet. The community pledged to release Bootstrap theme for Drupal-8.0.0 drupal.org/project/bootstrap MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 27
  • 28. OUR THEME SOLUTION Classy + MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 28
  • 29. LIBRARIES.YML EXAMPLE cuddly-slider: version: 1.x css: theme: css/cuddly-slider.css: {} js: js/cuddly-slider.js: {} MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 29
  • 30. LIBRARIES.YML - CSS EXAMPLE + css + base - normalize.css + layout - layout.css - layout--medium.css - layout--wide.css + components - button.css + theme - theme--light.css - theme--dark.css MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 30
  • 31. LIBRARIES.YML - JS MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 31
  • 32. QUESTION, BUG OR NOT? Started theming from Beta 14. Our theme is a sub theme of Classy. In beta 16, we implemented the libraries, but not javascript is coming up. We checked several times, but it doesn’t work. What is going on ? Bug or not ? MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 32
  • 33. INJECT YOUR CSS AND JAVASCRIPT Not a bug. Learn the hard way, if you want JS, in <head> inside html.html.twig you will need : <js-placeholder token="{{ placeholder_token|raw }}"> Classy theme does not use javascript, no JS injection in the template in beta-14. It came later on in classy. We found that line when Classy got updated, on beta-16. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 33
  • 34. LIBRARIES.YML MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 34
  • 35. LIBRARIES.YML Note the dependencies with Drupal core javascript. - core/DrupalSettings It lets us use the settings variables in Drupal behaviors. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 35
  • 36. JAVASCRIPT IN DRUPAL 8 The “ok it works” method $(document).ready(function () { // Do some fancy stuff. }); MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 36
  • 37. JAVASCRIPT IN DRUPAL 8 The right way. Drupal.behaviors(drupalSettings) .once() MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 37
  • 38. JAVASCRIPT IN DRUPAL 8 Drupal.behaviors.myBehavior = { attach: function (context, settings) { $('input.myCustomBehavior',context) .once('myCustomBehavior').addClass('processed'); } }; MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 38
  • 39. TWIG DEBUGGING, ACTIVATE sites/default/services.yml parameters: twig.config: debug: true MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 39
  • 40. TWIG DEBUGGING, RESULT IN HTML <!-- THEME DEBUG --> <!-- THEME HOOK: 'node' --> <!-- FILE NAME SUGGESTIONS: * node--view--frontpage--page-1.html.twig * node--view--frontpage.html.twig * node--1--teaser.html.twig * node--1.html.twig * node--article--teaser.html.twig * node--article.html.twig * node--teaser.html.twig x node.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/classy/templates/content/node.html.twig' --> <article>....</article> <!-- END OUTPUT from 'core/themes/classy/templates/content/node.html.twig' --> MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 40
  • 41. TWIG DEBUGGING, DEVEL KINT MODULE Debug all the variables: {{ kint() }} Debug an object or array: {{ kint(page.content) }} For special characters (like #), use this: {{ kint(page[“#content_two”]) }} MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 41
  • 42. TWIG DEBUGGING MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 42
  • 43. CONFIGURATION MANAGER MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 43
  • 44. FEATURES MODULE IN DRUPAL 7 Features is a contributed module to group components from modules together in a single feature module. What we are supposed to do with features: Group together functionalities to answer a specific use case. What we really do with the features module in Drupal 7: We build a complex deployment system to synchronize environments. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 44
  • 45. DRUPAL 8 CONFIGURATION MANAGER The configuration manager module stores all the configuration of your project as yaml files. Made to synchronize environments and helps to manage complexity. Those yaml files are : - Small: Reduces conflicts. - Organized: They follow a naming standards and structure. - Separate: Sites own a configuration, not modules. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 45
  • 46. DRUSH COMMANDS FOR CONFIGURATION Export your configuration: $ drush cex Import your configuration: $ drush cim Those commands import / export all your configuration. Use GIT to select which yaml configuration you really want to update and share. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 46
  • 47. DRUPAL 8 CONFIGURATION MANAGER The configuration manager is not made to share configuration across several projects. Your site owns a configuration. To use the configuration in different environments of the same project, they will need the same Universally Unique IDentifier (UUID). Drush command to know your project’s UUID: $ drush cget system.site To edit the UUID: $ drush cedit system.site MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 47
  • 48. BETA ISSUES During the beta development, the variable name to synchronize the configuration changed, from “staging” to “sync”, causing us some issues. You will now set your configuration folder like : $config_directories['sync'] = './../config/sync'; MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 48
  • 49. QUESTION, BUG OR NOT? We deleted a field. The system deleted a view at the same time. We checked the view using the UI, that specific field was not used in the view. What happened ? Bug or not ? MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 49
  • 50. NOT A BUG, IT’S DEPENDENCY The fields were in the master display of the view, but not in any current display. Overridden by all displays in the view, we could not see the field in Views UI. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 50 Dependency. Deleting a field, used in a view, would delete that view.
  • 51. CUSTOM MODULE MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 51
  • 52. MODULES ARCHITECTURE Description of your module is now a yaml file. We still used a “.module” file. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 52
  • 53. CUSTOM MODULE WITH FORM API Form API is pretty similar as in Drupal 7. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 53
  • 54. WHAT HAPPENED TO $USER? Drupal 7: GLOBAL $user; Drupal 8: $user = Drupal::currentUser(); Access the roles like: $user->getRoles() MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 54
  • 55. WHY DRUPAL 8 IS FAST? Out of the box, Drupal 8 is optimized for production. To develop, you will have some minor changes to do. Here is the result of our Drupal 8 project, with a basic configuration : Results from webpagetest.org for 2015.drupalcebu.org few days before the event. MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 55
  • 56. MORE ABOUT D8 CORE AT DRUPALCAMP CEBU 2:45 PM 5 PM MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 56 All sessions of Drupalcamp Cebu 2015 on 2015.drupalcebu.org/sessions
  • 57. QUESTIONS ? MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 57
  • 58. THANK YOU ! Leolando Tan, @leolandotan https://www.drupal.org/u/leolando.tan Mary Chris Casis, @casismary https://www.drupal.org/u/casism Luc Bezier, @Luukyb https://www.drupal.org/u/luukyb MADE WITH DRUPAL 8 Leolando Tan, Luc Bezier, Mary Chris Casis. Drupalcamp Cebu 2015 58