> For the complete documentation index, see [llms.txt](https://salsa-digital.gitbook.io/govcms-site-builder/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://salsa-digital.gitbook.io/govcms-site-builder/unit-8-site-building-exercises/agency-reference-link/exercise-8-2-create-agency-references.md).

# Exercise 8.2: Create Agency References

Content Reference is a useful tool in GovCMS. It helps you create new relationships between content. There are many ways to leverage this connection with Views. For example, when you’re viewing an **agency** page, you could show which jobs “back reference” to that agency.

![Image of ATO site](/files/i1ZjkFd72GNj8FxX23Zo)

## Create the Agency content type

Using what we’ve covered so far on content types, create a new content type using these settings:

| Name               | Agency                                                     |
| ------------------ | ---------------------------------------------------------- |
| Description        | A government agency listing jobs or services on this site. |
| Title field label  | Agency name                                                |
| Publishing options | NOT Promoted to front page                                 |
| Display settings   | Don’t Display author and date information.                 |
| Menu settings      | No menu                                                    |

Click **Save and manage fields**.

![Image of Agency logo config settings](/files/6s98JBeJU1DbyjbFSMhW)

{% hint style="info" %}
**Note:** Make sure you check permissions, allowing Content Authors to create agencies.
{% endhint %}

## Add agency logo image field

We’re now going to add the **Image field** to the agency content type. When adding the field, make sure you also configure the **form display** and the **display** of the field. Use the following settings:

![Image of Agency logo config settings](/files/BxYDOVljCZOzNjdF7im2)

* **Label:** Agency Logo
* **Field name:** field\_agency\_logo
* **Field type:** Media Reference (not Dynamic media reference)
* **Number of values:** 1
* **Required:** Leave unselected
* **Help text:** “If available, please upload a logo for this agency.”
* **Media type:** Image

![Image of Agency logo config settings](/files/GE1V7CmFmNKFn7FYG7q9)

## Manage Form display settings

Click on the *Manage form display* tab. Select **Entity browser** from the Widget dropdown, then click the cog icon next to the **Agency logo** field.

Adjust the settings as shown in the screenshot below:

![Image of Agency logo config settings](/files/pKgsIfuq0Kfihx4mAtxw)

When finished, click the **Update** button and then **Save** the *Manage form display* page.

## Add references field to job posting

Finally, we’re going to add a references field for job postings.

1. Go to *Structure* → *Content types* → **Job posting** and click the **Manage fields** link.
2. Add a new field using these settings:

   * **Type:** Reference → Content
   * **Label**: Agency
   * **Field name**: agencyref (click to edit the machine name)
   * **Content type:** Agency
   * **Sort by**: - None -

   <figure><img src="/files/9YauVIXP8mrXkKeIXZiN" alt=""><figcaption></figcaption></figure>
3. Click **Save settings**.
4. You’ll also need to configure the form display. Use the **Select list** *widget* for the **Agency** field. Note: You can also move the **Agency** field on the form so it’s above the **Job description** field.
5. You’ll also need to configure the display. Set the *Agency* field to display as a link.
6. Your job posting fields will now look something like the screenshot below.

   <figure><img src="/files/BcbU3kpRK3FBYQzuzJM1" alt=""><figcaption></figcaption></figure>
7. You may rearrange any new fields we’ve added and bring them above the Job description field.

![Image of Manage form display](/files/2bNuRwKjvrU0rdHXvJAm)

![Image of Manage display](/files/lAlYkolQcTboNiBsui0U)

## Try it out

Now that you’ve added the new fields, it’s time to try them out.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://salsa-digital.gitbook.io/govcms-site-builder/unit-8-site-building-exercises/agency-reference-link/exercise-8-2-create-agency-references.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
