Little documentation and few base themes with 8.x branches - what's a front end developer to do? I'll show you what's changing in Drupal theming between D7 and D8 and how to create a custom theme based on the Classy base theme, step by step. We'll go over Twig basics and Twig debugging.
Quite significant changes were introduced in the theme system between Drupal 8 and 7. This guide contains information that applies to Drupal 8 theming.
Little documentation and few base themes with 8.x branches - what's a front end developer to do? I'll show you what's changing in Drupal theming between D7 and D8 and how to create a custom theme based on the Classy base theme, step by step. We'll go over Twig basics and Twig debugging.
Quite significant changes were introduced in the theme system between Drupal 8 and 7. This guide contains information that applies to Drupal 8 theming.
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Laura Scott
This is now DEPRECATED. Please see Grok Drupal (7) Theming, February 11 Update
These are slides for my presentation at DrupalCon San Francisco, April 2010.
There is <a>audio/video of the presentation at the DCSF website</a>.
My apologies for the extraneous slides -- that's how Slideshare converted my Keynote file.
Need start to finish help on getting Drupal 8 up and running locally? Ready to start contributing code?
This will help you get everything installed locally including Drush and gives basic information about Configuration for those new to it.
Grok Drupal (7) Theming - 2011 Feb updateLaura Scott
These are slides from my presentation at Drupal Design Camp Los Angeles, February 2011. Video with rather low resolution version of the slides (we inadvertently recorded my presentation notes screen rather than the projector screen) can be viewed on blip:
http://ladrupal.blip.tv/file/4731722/
Drupal 8 Theme System: The Backend of FrontendAcquia
If you develop with Drupal, chances are you've worked with Drupal's theme system, whether you knew it or not. With Drupal 8 out, what better time to learn more about the Drupal 8 theme system?
The theme system in Drupal spans both module development and theme development. The main responsibilities of the theme system are to prepare and output markup and other data, and to allow for overrides. The Drupal 8 theme system brings many changes including the Twig templating engine, automatically escaped markup for increased security, changes to theme suggestions, new base themes in core, and more.
Scott Reeves, Team Lead at Digital Echidna, and Drupal 8 theme system co-maintainer and provisional core committer will guide you through Drupal 8’s theme system. The webinar will cover important differences from Drupal 7 and also walk through the internals of different aspects of the theme system and how they might affect your day-to-day work with Drupal.
Topics will include:
-An overview of the important changes to the theme system from Drupal 7 to Drupal 8
-How to use theme hook suggestions to cut down on custom code and create more flexible and reusable components
-Phases of the theme and render systems and where you can step in to alter things
-Debugging tips and Twig magic
Stepping into theme development can be daunting. Sure anyone with a little PHP skill and a basic understanding of the loop can create theme templates, but there are a number of things you can learn which can take your theme development to the next level. We’ll discuss the skills that can take you from a beginner theme developer to a master.
A video of this talk given in Boston, MA can be seen at https://www.youtube.com/watch?v=IdMEOO0JmZA
(Updated for 2017)
Drupal 7 Theming - Behind the Scenes: PHP control flow starting from entering URL to browser displaying webpage. Covers Theme info file, regions, an Rendear Arrays (Phoenix User Group 1/25/2012)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Laura Scott
This is now DEPRECATED. Please see Grok Drupal (7) Theming, February 11 Update
These are slides for my presentation at DrupalCon San Francisco, April 2010.
There is <a>audio/video of the presentation at the DCSF website</a>.
My apologies for the extraneous slides -- that's how Slideshare converted my Keynote file.
Need start to finish help on getting Drupal 8 up and running locally? Ready to start contributing code?
This will help you get everything installed locally including Drush and gives basic information about Configuration for those new to it.
Grok Drupal (7) Theming - 2011 Feb updateLaura Scott
These are slides from my presentation at Drupal Design Camp Los Angeles, February 2011. Video with rather low resolution version of the slides (we inadvertently recorded my presentation notes screen rather than the projector screen) can be viewed on blip:
http://ladrupal.blip.tv/file/4731722/
Drupal 8 Theme System: The Backend of FrontendAcquia
If you develop with Drupal, chances are you've worked with Drupal's theme system, whether you knew it or not. With Drupal 8 out, what better time to learn more about the Drupal 8 theme system?
The theme system in Drupal spans both module development and theme development. The main responsibilities of the theme system are to prepare and output markup and other data, and to allow for overrides. The Drupal 8 theme system brings many changes including the Twig templating engine, automatically escaped markup for increased security, changes to theme suggestions, new base themes in core, and more.
Scott Reeves, Team Lead at Digital Echidna, and Drupal 8 theme system co-maintainer and provisional core committer will guide you through Drupal 8’s theme system. The webinar will cover important differences from Drupal 7 and also walk through the internals of different aspects of the theme system and how they might affect your day-to-day work with Drupal.
Topics will include:
-An overview of the important changes to the theme system from Drupal 7 to Drupal 8
-How to use theme hook suggestions to cut down on custom code and create more flexible and reusable components
-Phases of the theme and render systems and where you can step in to alter things
-Debugging tips and Twig magic
Stepping into theme development can be daunting. Sure anyone with a little PHP skill and a basic understanding of the loop can create theme templates, but there are a number of things you can learn which can take your theme development to the next level. We’ll discuss the skills that can take you from a beginner theme developer to a master.
A video of this talk given in Boston, MA can be seen at https://www.youtube.com/watch?v=IdMEOO0JmZA
(Updated for 2017)
Drupal 7 Theming - Behind the Scenes: PHP control flow starting from entering URL to browser displaying webpage. Covers Theme info file, regions, an Rendear Arrays (Phoenix User Group 1/25/2012)
Drupal Theme Development - DrupalCon Chicago 2011Ryan Price
This class is intended for people who know some HTML and CSS, and covers the fundamental principles of Drupal theming geared toward people who wish to take a static mockup of a site design and turn it into a Drupal theme. You will also learn about using base themes, grid-based layout and helper modules to streamline and customize your Drupal theme.
Trainer Ryan Price has built entertainment sites, social networks, and eCommerce sites for clients including Popular Science, Field and Stream and Outdoor Life magazines. With over 10 years of experience building sites with PHP and other technologies, Ryan began immersing himself in Drupal around 2006. Ryan often teaches and writes articles along with Mike Anello, and the duo is also known for producing the DrupalEasy Podcast with their host Andrew Riley.
Creating and breaking a module in Drupal 8.
Configuration Steps: https://www.gitbook.com/book/zivtech/debug-tools-for-drupal8/details
Debug your PHP code efficiently without Devel module’s dpm(Drupal Print Message). With Drupal 8’s adoption of Symfony and object-oriented architecture, we need to adjust how we debug our code. Up until now, many of us have been using the convenient dpm function for debugging and introspection. However, dpm cannot print protected properties or provide information about methods of an object.
This makes it difficult to debug objects and classes. It’s time to learn a new approach! We will look at alternative methods to solve this problem such as:
Xdebug with PHPStorm configuration - http://xdebug.org
Devel and the WebProfiler (D8+) Drupal module https://www.drupal.org/project/devel
Using the continuous integration tool Probo CI to speed up the testing and approval process - http://probo.ci/
We will create a module, break it and use the above tools to debug, test and fix the code. Whether you are dipping your toes into object-oriented PHP or you're an advanced developer, everyone can benefit from debugging their code more efficiently.
The presentation covers:
*Adding JS to the page, both at module and theme level
*Writing Drupal aware JS code
*Libraries management
*Ajax framework
*Drupal JS functions
*Drupal JS theme functions
Drupal Camp Porto - Developing with Drupal: First StepsLuís Carneiro
The goal of this presentation is to give Drupal new comers some insights about key aspects of developing with Drupal.
The idea is to give the audience some guidelines about good practices of Drupal development along with some tips and, by a simple example application, present the most common and important structures/characteristics of the Drupal API.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
1. 8 Things to Know About
Theming in Drupal 8
Or, “Lessons I Learned when Building a D8 Subtheme”
Logan Farr || LoganFarr.com || @logan_farr || @loganfarr
2. Site building
Object oriented programming
Module building
Hooks and API functions not
normally in theming.
JavaScript frameworks
Things we will not
be covering.
Constructing a Drupal 8 (sub)theme
How a Drupal 8 theme works
Templating and Twig*
Template preprocessing and theme functions
What the (theme) differences are between D7 and D8
Tools to debug a theme
Things we will be covering
5. dcu.info
name = DCU
description = An example theme for Drupal Camp Utah
base theme = Omega
screenshot = screenshot.png
engine = phptemplate
core = 7.x
stylesheets[all][] = css/dcu.styles.css
scripts[] = js/dcu.behaviors.js
regions[content] = Content
...
6. dcu.info.yml
name: DCU
type: theme
description: An example theme for Drupal Camp Utah
base theme: Omega
engine = phptemplate
screenshot: screenshot.png
core: 8.x
libraries:
- dcu/global-styling
#Regions
regions:
navigation: Navigation
header: Header
content: Content
machine_readable: Human Readable
stylesheets-remove:
- core/assets/vendor/normalize-css/normalize.css
7. 3. stylesheets-remove
You can prevent stylesheets from rendering on your page!
In THEME_NAME.info.yml:
stylesheets-remove:
- (path to stylesheet here)
- core/assets/.../normalize.css
Note: You need the FULL path of the CSS stylesheet (from the root directory).
Especially useful if:
● Trying to remove default module
styling
● Trying to remove unnecessary
system stylesheets
● Trying to remove a base theme
stylesheet
8. 4. Libraries
Probably the most notable change in Drupal 8.
Define library:
A collection of CSS stylesheets and JS scripts
Can be used globally, or just as needed.
Library Naming (NOT file naming):
THEME_NAME/LIB_NAME
dcu/global-styling
9. dcu.libraries.yml - Overview
global-styling: #LIBRARY_NAME
version: 1.x
css:
theme:
styles/css/style.css {}
styles/css/print.css { media: print }
js:
js/script.js {}
header:
js/header.js {}
dependencies:
core/jquery
sessions: #LIBRARY_NAME
...
(Yes, jQuery is now included in Core!)
11. dcu.libraries.yml - JS
D8 dcu.info.yml:
global-styling:
...
# By default, all JS is loaded in the footer
js:
js/script.js: {}
# But it can be overridden!
js-header:
header: true
js:
js/header.js: {}
js-footer:
js:
js/footer.js: {}
D7 dcu.info:
scripts[] = js/script.js
12. Attaching a Library to a Page
Options for loading a library:
● Every page
● A subset of pages
● Individual templates
(Remember, THEME_NAME/LIBRARY_NAME is how you reference a library)
To load a library on every page, place in your THEME_NAME.info.yml file.
To load a library on a subset of pages:
<?php
function dcu_preprocess_maintenance_page(&$variables) {
$variables['#attached']['library'][] = dcu/sessions';
}
?>
To load on a Twig template:
{{ attach_library('dcu/sessions') }}
13. You can override a library and remove a library with the commands
library-override
library-remove
Another note about libraries...
14. 5. Don’t mess up your YML.
If you are developing a theme and you get a WSOD or a 500 error, it’s because you have messed up
YML code.
Use spaces, not tabs
Don’t forget your colons (also forget your semi-colons)
Use colons not equal signs
Follow indentation
15. 6. The Themer’s Best Friend
Twig debugging!
To turn on, edit settings.php and services.yml
sites/default/settings.php
$settings['twig_debug'] = TRUE;
$settings['container_yamls'][] = __DIR__ . '/services.yml';
sites/default/services.yml
parameters:
twig.config:
debug: true
Thanks to Derek Walker (@derekawalker) for helping me out with this.
Also Devel - although a note: the
dpm() function is now kint()
17. Twig Debug, Turned ON
<!-- THEME DEBUG -->
<!-- THEME HOOK: ‘page’ →
<!-- FILE NAME SUGGESTIONS:
x page--page.html.twig
* page--front.html.twig
* page.html.twig
-->
<!-- BEGIN OUTPUT FROM
‘themes/dcu/templates/page--page.html.twig’ -->
(HTML HERE)
18. Functions now done in THEME_NAME.theme!
Some functions are different though.
For example, to add template suggestions to a page, use
hook_theme_suggestions_HOOK_alter().
Preprocess functions, like in D7, are used to pass variables to the page (Twig) templates.
7. Preprocess Functions are still a thing
19. Example Functions in dcu.theme
/**
* Implements hook_preprocess_HOOK().
*/
function dcu_preprocess_page(&$variables) {
$variables[‘title’] = ‘Come to the dark side.’;
$variables[‘page_class’] = ‘page-dark-side’;
kint();
}
/**
* Implements hook_theme_suggestions_HOOK_alter().
*/
function dcu_theme_suggestions_page_alter(array &$suggestions, array $variables) {
if ($node = Drupal::routeMatch()->getParameter('node')) {
$suggestions[] = 'page__' . $node->getType();
}
return $suggestions;
}