We have summarised the content, which is the menu for creating pages in Drupal, and the Structure, which is the configuration, in an article, and by summarising the relationship between the two and examples, the rules for building a Drupal site can be seen.
In this article, we will look at a real example of the Drupal rule explained in the previous article, that page creation is done in the Content menu and the creation and editing of content types used for page creation is done in the Structure menu. This will help you to understand that instead of the general idea that all page-related tasks are done in the Create Page menu, Drupal's rule is that page creation is done in the Content menu and configuration is done in the Site Building menu, and to understand the concept of what is done in the Site Building menu. The following sections will help you to understand the concept of what is done in the site building menu.
Let's go through an example of creating a page. We will use the example of the #L02 Lee 101Z 50's article written using the actual content type / Life Style article created in Structure > Content Types.
The page is a simple page.
The page components of the text are,
- Title Lee 101z 50's
- Top image Black and white photograph showing the jeans from behind
- Text article 1 Article about Lee 101z from Introduction to Example Photos.
- Sample Photos: black and white photograph of the entire body
- Written article 2 Summary of article from Ditails. onwards
- Date of submission: 2024-11-03 | Date of creation of article
- Contributor : S.Takeda | Article written by
- Tags : En Life Style | Term set in taxonomy
- Article content : Old-Clothes Articles.
- Breadcrumbs Home / En Life Style. / #L02 Lee 101Z 50's
is displayed.
The overall page layout is
- Header Site logo and title on the left Navigation menu on the right
- Article body
- Footer Site name and Powerd By Drupal
- Right side menu
The page is structured in the form of a guide above and below the article text and to the right of the article text called
In order to create this article page, you need to add the above mentioned image and article fields, tags, contributors, date and time fields to the article content type.
The default article and fixed page content types provided by default in Olivero, which is the default theme for Drupal, and Bootstrap 5, which is the theme used on this site, do not provide the fields required for the above page structure by default.
Understanding the Drupal rules for creating pages in Drupal is the purpose of the articles presented so far. As an example, if you want to add a tag element to a page, the process is as follows.
- I want to have a tag element in the article so that I can sort the list pages later.
- In Taxonomy, create a vocabulary that will become a tag and create the required term.
- Add a tag field in the content type to allow page elements to have tags.
- Create an article in the content type with the tag field added.
The above process is required when a tag element is needed in an article. The key to the process described is to 1. set the tag elements in the taxonomy, 2. place the tag elements on the page in the content type, and 3. create the article in the content type where the taxonomy has been set.
Understanding that you need to configure the settings across these separate menus, and understanding where to do this, will enable you to create article pages with the desired elements that are not present in the article pages created with the default content type.
A content type is like a template for writing articles in Drupal, and articles are created using this content type template. This article is about how to create and configure this content type, which is a template, and how it needs to be configured in the site building.
I'll try to summarise the process of creating a page based on the#L02 Lee 101Z 50's article.
Choose a content type from the content menu and write an article.
- In the content menu, I will write an article about Lee 101z second-hand jeans.
- As I am writing an article about second-hand clothes, I will select the content type ‘Life Style’ that I prepared for writing articles about second-hand clothes, and write the article. Life Style has fields where you can add the tags and images that you set up below.
Structure > Taxonomy > Create vocabulary and terms using taxonomy.
- Create the vocabulary ‘tag’, and create the term ‘Life Style’ that belongs to the tag
- Create the vocabulary ‘article content’, and create the term ‘Old-Clothes Articles’ that belongs to the article content
Structure > Content type > Set the fields for each element to be placed on the page in the content type.
- The content type ‘Life Style’ is created using the content type in the site construction menu.
- The default fields provided in the content type editor are configured by adding the following fields: 1. image body, 2. main text 2, 3. date posted, 4. contributor, 5. tags, 6. article content.
Structure > Block Layout > Set the display of the header, footer, side menu and breadcrumb list in the block layout.
- In the block layout, hide the default breadcrumbs list and display the breadcrumbs list at the bottom of the page.
- In the block layout, select and display the side menu used in the Life Style articles.
- The header is displayed on all pages, so there is no need to make any settings here.
- The footer is displayed on all pages, so there is no need to make any settings here.
To create a page, enter the following information in the Content > Life Style article to create an article.
Home > Administration > Content > Content > Life Style Article
- Enter title | Existing field { #L02 Lee 101Z 50's }
- Insert top image | Existing field { B&W photo taken from the back }
- Write article 1 | Existing field { Articles from Introdaction. to 4. History and functional beauty }
- Insert image into main text I Additional field { B&W full-length shot in centre of page }
- Write article in main text 2 | Additional field { From details to end of article }
- Insert date posted | Additional field { Specify date posted 2024-11-03 }
- Insert author | Additional field { Specify author S.Takeda }
- Select the term ‘Life Style’ for the tag | Additional field { specify Life Style }
- Select the term ‘Old-Clothes Articles.’ for the article content | { specify Old-Clothes Articles. }
- Insert /en/en-lifestyle/fa002 for the URL alias | Existing field { specify the actual URL to be used }
The above process will create a page for the #L02 Lee 101Z 50's article. The actual work is not as complicated as the text summarised here. I have spent three articles explaining it at length, but I think that understanding page creation and Drupal rules is extremely important, and that those who fail to understand this are the reason why people install Drupal but eventually give up using it.
In order to create pages in Drupal, you need to set up the site structure in the Structure menu as well as the content menu for creating pages
Unless you set the site structure in the site construction menu to the desired form, you will not be able to escape from the default page structure and will not be able to freely configure the pages.
It's not difficult to understand, so I'm writing this article in the hope that it will provide an opportunity for those who have installed Drupal but eventually gave up on using it because they were not interested in it to use the Drupal they have installed after all.
The template for creating pages is called a content type, and the process of creating this template and adding the necessary elements is called Structure > content.
The basic building blocks are called fields, and you can add fields for tags, images, etc. to these fields and make settings. By making these settings, you can add the necessary elements to the template and create pages with the structure you want.
Creating a page < Selecting a content type = Creating a page template < Provided by default | Minimum requirements
Content type = Creating a page template < Adding required elements | Adding tags and image fields
Site construction > Content type | Settings here
This is an important thing that you will definitely need if you use Drupal, and it is essential knowledge for building the website you want, but the reason I wrote this article is that I myself couldn't find a place to get this knowledge when I first installed Drupal. After installation, you can understand it and build a website by playing around with the menus, but I think that there are many people who give up using Drupal because they can't understand it.
As I was writing this article, I was reminded of a story I read about Henry Ford, the founder of Ford, in a biography of great men that I read when I was a child. I remember it only vaguely, but Henry Ford's mother was in a critical condition and they went to the hospital in a horse-drawn carriage, but they didn't make it in time and she died. At that time, Henry Ford, in his regret, thought that if there was a faster vehicle than a horse-drawn carriage, his mother might have survived, and he thought about creating a faster vehicle than a horse-drawn carriage in order to eliminate the misfortune he had faced from the world. That was the automobile, and he founded a company to make them, and the world-famous Ford was born.
My article is not directly related to the story of a great man like Henry Ford, but I wrote it thinking that there might be people facing the same problems I faced, and that if even just a few people facing the same problems could be helped by it, then it would be a good thing. Although I'm not a volunteer, I use the open source software Drupal, so I hope that by sharing the things I have faced and solved, even if it is only a little, and by having the spirit of mutual support that is the basic spirit of open source, I can be of some help to others and help Drupal to spread in a good way.
It's a long article and not easy to read, but we hope that it will provide an opportunity for you to use Drupal.
Finally, we have summarised the content types and block layout configuration.
Default article page before adding fields
|-- Content type / Article
| |
| |-- Title / Default field
| |-- Image / Default field
| |-- Main text / Default field
| |-- Tags / Additional field {Structure > Configured in content type} |
|-- Taxonomy
| |-- Vocabulary / Tags {Structure > Set up in Taxonomy}
| |-- Terms / No settings
The page you created for Life Style
|-- Content type / Life Style
| |
| |-- Title / Default field
| |-- Image / Default field
| |-- Main text 1 / Default field
| |-- Image main text / Additional field { Structure > Configuring with content types }
| |-- Main text 2 / Additional fields { Structure > Set in content type }
| |-- Date posted / Additional fields { Structure > Set in content type }
| |-- Author / Additional fields { Structure > Set in content type }
| |-- Tags / Additional fields { Structure > Set in content type }
| |-- Article content / Additional fields { Structure > Configure content types }
|
|-- Additional taxonomy items
|-- Vocabulary / Tags { Structure > Configure taxonomy }
| |-- Terms / Life Style{ Structure > Configure taxonomy }
|
|-- Vocabulary / Article Content{ Structure > Set up in Taxonomy }
| |-- Term / Old-Clothes Articles.{ Structure > Set up in Taxonomy }
Block layout
|-- Header
| None
|-- Navigation branding region
| |-- Site title
|-- Main navigation region Additional navigation region
| |-- Menu
|-- Breadcrumbs
| None { Structure > Configure block layout }
|
|- First sidebar
| None
|
|-- Main content
| |-- Message / Default
| |-- Page title / Default
| |-- Tabs / Default
| |-- Help / Default
| |-- Primary navigation actions / Default
| |-- Main page content / Default
| |-- Breadcrumbs / Add Block { Structure > Configure in Block Layout }
|
|- Second Sidebar
| |-- Sidebar01 / Add Block { Structure > Configure in Block Layout }
|
|- Footer
| |-- Footer01 / Add Block { Structure > Configure in Block Layout }
I started writing an article on the theme of understanding the basic concepts of Drupal, using the example of creating a page, but ended up writing three articles in total, which made it difficult to read. The menu for building a site with Drupal settings is very flexible and has a high degree of freedom, so from now on I will write articles on building websites while making use of this advantage.
After putting together this article, I have written an article listing the things I think are necessary, but the way I write and summarise articles is difficult, and the articles end up being difficult to read, so I feel that I would like to think about how to make concise and clear articles in the future as one theme.
Basics of creating page
I've been writing a series of articles on the basic concepts of Drupal that are necessary for creating pages, but since it's become a lot of articles and it's hard to understand, I'm going to organise them.