1 of 95

Understanding Drupal

@ DrupalCamp Colorado 2021

https://udrupal.com/understanding-drupal

2 of 95

3 of 95

Mauricio Dinarte

4 of 95

Drupal Nicaragua

5 of 95

Masaya Volcano

6 of 95

7 of 95

8 of 95

9 of 95

Outline

  • Why Drupal?
  • What is Drupal?
  • Basic concepts
  • Nodes
  • Content types
  • Fields
  • Blocks
  • Theme regions
  • Views
  • Layout builder
  • Users and permissions
  • Menus and taxonomy

10 of 95

What was the last website you visited?

11 of 95

/about

/team

/services

/articles

/contact

/

12 of 95

13 of 95

Why Drupal?

14 of 95

www.weather.com

15 of 95

www.grammy.com

16 of 95

www.naranjatradicionaldegandia.com

17 of 95

www.tesla.com

18 of 95

Some features of these websites

Traffic

19 of 95

What is Drupal?

20 of 95

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.

21 of 95

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.

22 of 95

Drupal as a Community

  • 200+ countries
  • 150+ languages
  • 30,000+ code contributors
  • 97,000+ active users

23 of 95

Basic Concepts

24 of 95

Core

  • The minimum required software to start a drupal project.
  • It contains modules and themes.
  • Serves as a framework to build on top of.

25 of 95

Modules

Themes

Add functionality

Control appearance

26 of 95

Contrib Repository

Community contributed modules, themes, and distributions. These extend Drupal beyond its pre-built functionality.

27 of 95

Content

28 of 95

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.

29 of 95

30 of 95

31 of 95

32 of 95

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.

33 of 95

Every Node is of One Specific Content Type

7

2

1

4

11

12

5

10

9

3

6

8

Article

Basic Page

Car

34 of 95

35 of 95

Fields

They are awesome!

36 of 95

37 of 95

Free Text Is Not Easily Searchable

38 of 95

Inconsistent Data Is Not Easily Searchable

November 19, 2015

Nov. 19, 2015

11/19/2015

11/19/15

11-19-15

39 of 95

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! :)

40 of 95

I want to cry

Free text

Inconsistent data

Invalid data

41 of 95

Drupal Can Enforce Validation�Criteria

42 of 95

Drupal Can Enforce Validation�Criteria

Happiness

43 of 95

Recipe to Make Drupal Happy

I ♥ you!

  1. One field per piece of data to store.
  2. Select the right type of field. Example: integer, decimal, image, phone, email, url, etc.

44 of 95

Collecting Data

45 of 95

Presenting Data

46 of 95

Aggregating Data

47 of 95

Can Be Shown or Hidden Individually

Fields allow you to cherry-pick what information to show and what information to hide.

48 of 95

Example of Field Types

49 of 95

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.

50 of 95

51 of 95

Block

52 of 95

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.

53 of 95

Theme Region

54 of 95

Blocks Can Display Static or Dynamic Content

Static content

  • Display the same data (almost) all the time. E.g.: copyright text or the banner of a sponsor.

Dynamic content

  • Change its content regularly. E.g.: latest blog posts or newest products in the store.

55 of 95

Blocks Can Enforce Visibility

Rules

Show or hide the block depending on certain conditions.

56 of 95

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:

  • More posts from the same author.
  • More vehicles on sale in the same city.

57 of 95

Blocks Can Have Fields

Similarly to content types, it is possible to define block types and add fields to them.

Example:

  • A “special offer” block type with fields for title, description, image, and expiration date.

58 of 95

Views

59 of 95

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.

60 of 95

61 of 95

62 of 95

Drupal Loves Nests

63 of 95

Markup

64 of 95

Render Arrays

65 of 95

Concepts

66 of 95

67 of 95

68 of 95

69 of 95

Layout Builder

70 of 95

71 of 95

User

72 of 95

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.

73 of 95

74 of 95

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:

  • Anonymous user
  • Authenticated user
  • Administrator.

75 of 95

A Permission...

Checks if a user can perform a specific action. For example:

  • Create content of type Article.
  • Revert revisions for the content type Article.
  • Post comments.
  • Use the site-wide contact form.

76 of 95

Drupal’s Permission System

Permissions

Role

User

Note that users can have multiple roles!

Every permission in each role is granted.

77 of 95

Menu

78 of 95

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.

79 of 95

80 of 95

Taxonomy

81 of 95

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.

82 of 95

Vocabulary: Fruits

Apple

Strawberry

Orange

Grapes

Note that taxonomy terms can have fields!

In this example, an image field.

83 of 95

Voc.: Living Organisms

Animals

Plants

Fungi

Bacteria

Protists

Cnidaria

Chordata

Arthropods

Echinoderms

Actinopterygii

Chondrichthyes

Amphibia

Aves

Reptilia

Molluscs

Mammalia

(Kingdom)

(Phylum)

(Class)

84 of 95

Real Life Example:�Pets Cat-egorization

85 of 95

Other Example Uses

  • List every piece of content tagged with a specific term.
  • Show additional content with the same tags. Similar By Terms module.
  • Create editorial access controls based on hierarchies. Workbench Access module.
  • Associate geographic location to terms to be rendered on a map. Location Taxonomize module in Drupal 7. Attach address field in Drupal 8/9.

86 of 95

87 of 95

FAQ

88 of 95

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.

89 of 95

Modify Drupal without Hacking

Check out Joe Shindelar (@eojthebrave)’s session “Altering, Extending, and Enhancing Drupal 8” at

www.youtube.com/watch?v=tMM-I70ksQA

90 of 95

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

91 of 95

Get Involved�with the Community!

92 of 95

93 of 95

Thank You!

Let’s continue the conversation on twitter

#UnderstandingDrupal

94 of 95

Please Provide Feedback

95 of 95

Understanding Drupal

@

https://udrupal.com/understanding-drupal