> 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/job-list-dropdown-filter/exercise-8-4-agency-logo-in-job-posting-view.md).

# Exercise 8.4: Agency logo in Job Posting view

In this exercise, we’ll add in the logo of the agency offering the job, by setting up a **View relationship**. In the current setup, the agency’s logo is part of the **Agency content type**, and the view of *Job Posting* doesn’t allow us to show it. If we link the two content types together, we can display the agency logo in the job posting (like the screenshot below).

<figure><img src="/files/S7IIn8n0sFHInpJ4DOEM" alt=""><figcaption><p>Job listing page showing Agency logos</p></figcaption></figure>

## Preparation - create Agencies, update Job Postings

1. Add some new Agency content and upload a logo for each. See the screenshot below for an example.<br>

   <figure><img src="/files/lVUkISuJ3eOtnFhQmLVG" alt=""><figcaption><p>Adding an agency</p></figcaption></figure>
2. Update some existing **Job postings** to link to the agencies setup in step 1. See the screenshot below for an example.<br>

   <figure><img src="/files/Q3cgkIlZQDShWpDAV0DI" alt=""><figcaption><p>Adding an agency reference to a job</p></figcaption></figure>

## Add a relationship

Next, we need to add a relationship to the main Job Listing View so that we can join the data from the Agency content type (specifically the logo) into the Job posting content type.&#x20;

Without the relationship set up, if you tried to add a new field of “agency logo” to the **Job posting** *content type* the results would be blank.

1. Go to the edit screen of your Job Listing view Click on **Advanced** in the right column. Under "Relationships" click **Add**.
2. Next, search for "agency".

   <figure><img src="/files/gxZuyWWejrfpiZNoBCcg" alt=""><figcaption><p>Adding a relationship reference for Agency</p></figcaption></figure>
3. Select **Content referenced from field\_agency**
4. Click **Add and configure relationships**. This will take you to the next configuration screen. Do NOT check the box "Require this relationship".
5. &#x20;Click the **Apply** button.&#x20;

## Add fields

1. In the Fields section of your Job Listing view, click on Add field. Then search for logo (this is the logo field in your Agency content type).<br>

   <figure><img src="/files/DwpRCV2TCGG804ClCR39" alt=""><figcaption><p>Adding Logo field of agency</p></figcaption></figure>

2. In the fields setting, apply the following settings as show in the screenshot. \
   \- Set the relationship to the one you created in previously. \
   \- Give it a Label\
   \- Set an appropriate Image style\
   \- Optionally set "Link image to" content.<br>

   <figure><img src="/files/xxFak2aYEgk4cvKduF7K" alt=""><figcaption><p>Field settings for logo field</p></figcaption></figure>

{% hint style="warning" %}
**Important!** Remember to set the **Relationship** to reference the relationship created in the preceding steps.
{% endhint %}

3. Change the Format to "Table" so the final output will look similar to the screenshot at the top of this page.<br>

   <figure><img src="/files/R34ErPbZ3pSViKKK3AfB" alt=""><figcaption><p>Changing format to Table</p></figcaption></figure>

4. Save your View and visit your job listings page to view the results.


---

# 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/job-list-dropdown-filter/exercise-8-4-agency-logo-in-job-posting-view.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.
