# Homepage content type

### Exercise: Building a Homepage content type

We'll build a new content type which we will use to build the homepage with all of its components shown in our design.

1. From Drupal's Admin Toolbar, click **Structure | Content Types**
2. Click the \*\*Add content type \*\*button
3. In the *name* field type **Homepage**
4. Click the **Save and manage fields** button at the bottom of the page
5. Delete the \*\*body \*\*field

### Exercise: Adding the Hero field to the Homepage

1. While still in the Homepage content type, click the **Add field** button
2. Under the *Add a new field* dropdown, scroll to the **Reference** section and select **Content**

   | Label | Machine name |
   | ----- | ------------ |
   | Hero  | `field_hero` |
3. Click the **Save and continue** button
4. Change *Allowed number of values\_* to **Limited - 1**
5. In the *Reference Type* section, choose **Article** under *Content type*
6. Click the **Save settings** button

### Exercise: Create a new Node with a Hero

Using the Homepage content type, create a new node and add a Hero component in it:

1. From Drupal's Admin toolbar, click **Content**
2. Click the **Add content** button
3. Select **Homepage**
4. As the Page title type\*\* Homepage\*\*
5. In the Hero field, begin typing any characters and as article suggestions begin to display, select an article of your choice
6. Click the \*\*Save \*\*button

The above exercise will create a node of type Homepage, with an article as the Hero. It is clear we have more work to do since the Hero article does not look like a Hero at all. We will clean things up in the following exercises.\\

![Drupal Node with Hero](/files/-M6w_YyOnjJ167mQ5YKa)

It's pretty obvious there are a lot of things that need improvement with our Hero, but we will get to that shortly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariohernandez.gitbook.io/components/a-components-lifecycle/homepage-content-type.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
