two man talking

Phrases That You Need to Understand When Talking to a Drupal Developer: Field and Block

In this post, you will find more phrases often used by Drupal programmers. Familiarise yourself with this and the other texts in the series in order to work more effectively with the development team.

The most commonly used phrases related to Drupal

Other articles of this series can be found here:

Field

In short: Fields in Drupal are attributes assigned to the data type, e.g. tags in articles or the amount of remuneration in a job offer.

More detailed explanation

Node Types are created in the administration panel on the subpage /admin/structure/types. You can also edit the already existing content types there. One of the edit options is "Manage Fields".  

The Fields are assigned to Entities – a Node entity in this case (explanation of the word [Node]). One field means one additional element on the content adding form (there are exceptions, but they are rare). 

If you want to have a form for adding job offers, and in it – the option to enter the amount of remuneration, add a new field. If you want to add products on a website and provide PDF instructions together with a product description, add a field, etc. 

Below are examples of the data structure of several types of content from the previous article.

Article:

  • Title,
  • Introduction,
  • Content,
  • Main photo,
  • Category.

Job offer:

  • Position name,
  • Duties description,
  • Requirements,
  • Location,
  • Remuneration,
  • Number of vacancies.

Each of the elements listed above is a separate field.

Field types in Drupal

Fields can have types. In this case, the list is exhaustive and defined by the Drupal core or additional modules. The most commonly used field types are:

  • Single-line text field,
  • Multiline text field.
  • Field with a list (e.g. select one element from the 20 defined),
  • Field with a reference (the content types can be combined, e.g. a Job offer may have references to the "Company facility" content type),
  • Field for uploading a photo,
  • Field for uploading any type of file,
  • Link,
  • E-mail,
  • Phone.

A programmer can write a module that defines a new field type. He can also install one of the additional modules defining a new field type, e.g. Address Field.

Knowing the field types and knowing that you have the ability to create many types of content, you can plan the structure for the data that you want to present on the website. By using these terms, you can quickly set out the details with the programmer. 

Regions and Blocks

A block is a fragment of a page that may be used repeatedly within a single subpage or on many subpages. A block is usually a small part of a page presenting text or graphics. I will provide some examples in order to illustrate what can be a Drupal block:

  • Menu,
  • Search engine form,
  • Social media icons,
  • Form for logging in,
  • Last 3-5 pieces of content of a given type,
  • Banners redirecting to other areas of the website,
  • Form for subscribing to a newsletter.

Every subpage in Drupal consists of the following elements:

  • content – i.e. what is in the centre of the screen,
  • blocks – i.e. what is usually above the content, below the content and next to the content (in a column or two columns, depending on the layout of the page).

Sometimes there are other elements but let us assume that in our ideal situation there are only content and blocks on the subpage. 

Bocks are placed within so-called regions. Regions are places on a page with a specific location, e.g. a footer. Within a single region, you can insert one or more blocks, e.g. in the footer, you can insert a block with the menu and a block with social media icons. 

Most often, the subpages are built so that the blocks in the Header and Footer regions are the same on all subpages. This is the rule for most [corporate websites]. Only their content changes. Depending on the website, it is just the content, extending to 100% of the page width, or the content and columns (e.g. 67% for the content and 33% for one column). 

When talking with a Drupal programmer about the layout of elements on a given subpage, you will probably hear about blocks and regions quite often. Now you know what do these words mean.

Summary 

It is a second article of the series. From these two articles you already know what a Node, Field, Block and Region are. When you have such knowledge, talking with a Drupal developers’ team should be much easier.

If you have not seen the previous articles of the series yet, you can find them here:

e-book cover