Understanding Drupal
@ DrupalCamp Colorado 2021
https://udrupal.com/understanding-drupal
Session recording
Mauricio Dinarte
Drupal Nicaragua
Masaya Volcano
Outline
What was the last website you visited?
/about
/team
/services
/articles
/contact
/
Why Drupal?
www.weather.com
www.grammy.com
www.naranjatradicionaldegandia.com
www.tesla.com
Some features of these websites
Traffic
What is Drupal?
Drupal as a CMS
Drupal is a content management system. It allows multiple people to participate in the creation of content. Also, it is possible to establish publication workflows, content revisioning, and granular access control over each piece of information.
Drupal as a Framework
Drupal is a development framework. Through custom code it is possible to extend Drupal beyond its pre-built functionality. For example, to create an ecommerce website or the backend of an application.
Drupal as a Community
Basic Concepts
Core
Modules
Themes
Add functionality
Control appearance
Contrib Repository
Community contributed modules, themes, and distributions. These extend Drupal beyond its pre-built functionality.
Content
What is a Node?
A piece of information that can tell a story by itself. It serves as a container of information used to describe something.
Content Types
Abstraction that allows you to group nodes which share similar characteristics or describe the same idea. They serve as a template to collect information. Once collected, they ease the management of that information.
Every Node is of One Specific Content Type
7
2
1
4
11
12
5
10
9
3
6
8
Article
Basic Page
Car
Fields
They are awesome!
Free Text Is Not Easily Searchable
Inconsistent Data Is Not Easily Searchable
November 19, 2015
Nov. 19, 2015
11/19/2015
11/19/15
11-19-15
Invalid Data Makes Drupal Cry
Age: -10 years old
Birthdate: February 31, 2000
Price: $ 1.5 euros
Email: notareal.email
Phone: Hi, I am beautiful! :)
I want to cry
Free text
Inconsistent data
Invalid data
Drupal Can Enforce Validation�Criteria
Drupal Can Enforce Validation�Criteria
Happiness
Recipe to Make Drupal Happy
I ♥ you!
Collecting Data
Presenting Data
Aggregating Data
Can Be Shown or Hidden Individually
Fields allow you to cherry-pick what information to show and what information to hide.
Example of Field Types
Fields
They are used to structure the information that is being stored. They save discrete data which can be used for displaying, filtering, and sorting information. It is possible to enter and display a field’s data in various ways.
Block
What is a Block?
A container of extra information to display along the main content of your website. They are placed in a theme region.
Theme Region
Blocks Can Display Static or Dynamic Content
Static content
Dynamic content
Blocks Can Enforce Visibility
Rules
Show or hide the block depending on certain conditions.
Blocks Can Be Aware of the Environment
Use data from the environment in which the block is displayed to change the information to be presented.
Examples:
Blocks Can Have Fields
Similarly to content types, it is possible to define block types and add fields to them.
Example:
Views
What is a View?
A view is a listing of information. It can be a list of nodes, users, comments, taxonomy terms, files, etc.
Views scans your website using any criteria you specify and presents the results in the format of your choice. For example, a HTML table, a RSS feed, a PDF document, a CSV document, an interactive map, an image slideshow, or a JSON representation to be used as a REST endpoint.
Drupal Loves Nests
Markup
Render Arrays
Concepts
Layout Builder
User
What is a User?
A visitor to the website. Depending on who is visiting the website it is possible to change the information they see.
Drupal can handle multiple users which makes account credential sharing among multiple people unnecessary. This is useful to keep track of changes to the website.
A Role...
Is a collection of permissions. They are used to assign privileges to a group of users. For example: a C-level executive, a sales representative, etc.
Drupal ships with three default roles, but more can be added:
A Permission...
Checks if a user can perform a specific action. For example:
Drupal’s Permission System
Permissions
Role
User
Note that users can have multiple roles!
Every permission in each role is granted.
≈
Menu
What is a Menu?
Menus are a collection of links used to navigate the website. Drupal ships with default menus like the “Main Navigation” and others can be added by as needed.
Menus can be hierarchical. That is, a menu can be various level deep where a menu link can have other menu links under it.
Taxonomy
What is Taxonomy?
It is a system used for categorization which allows you to connect, relate, and classify your website’s content.
In Drupal, taxonomy vocabularies are containers for a set of taxonomy terms. Vocabularies can be hierarchical. That is, a vocabulary can be various level deep where a term can have other terms under it.
Vocabulary: Fruits
Apple
Strawberry
Orange
Grapes
Note that taxonomy terms can have fields!
In this example, an image field.
≈
Voc.: Living Organisms
Animals
Plants
Fungi
Bacteria
Protists
Cnidaria
Chordata
Arthropods
Echinoderms
Actinopterygii
Chondrichthyes
Amphibia
Aves
Reptilia
Molluscs
Mammalia
(Kingdom)
(Phylum)
(Class)
Real Life Example:�Pets Cat-egorization
Other Example Uses
FAQ
Is it a Good Idea to Change the Downloaded Code for a Quick Fix?
NO!
When performing updates, the new code can override your changes. Also, you might alter the framework’s functionality and prevent other code from working. Instead, use the framework API to alter its behaviour as needed.
Modify Drupal without Hacking
Check out Joe Shindelar (@eojthebrave)’s session “Altering, Extending, and Enhancing Drupal 8” at
To Learn the Basics of Drupal’s Markup
Check out my session “Twig recipes: Making Drupal 8 render the markup you want”
www.youtube.com/watch?v=bqfxaFLQ8D4
Get Involved�with the Community!
Thank You!
Let’s continue the conversation on twitter
#UnderstandingDrupal
Please Provide Feedback
https://udrupal.com/understanding-drupal
https://udrupal.com/understanding-drupal-feedback
@dinarcon | mauricio@agaric.com
Understanding Drupal
@
https://udrupal.com/understanding-drupal