# Sections

## Sections

**Files:** `src/content/sections/english/` (and each other language folder), page content files · **Skill level:** Beginner to edit, light code to add or move

A **section** is one full-width block of a page: the hero, the listings, the reviews, the FAQ. Each section is two files that share a name:

```text
src/layouts/components/sections/ReviewsSection.astro   ← how it looks (component)
src/content/sections/english/reviews-section.md        ← what it says (content)
src/content/sections/french/reviews-section.md
src/content/sections/arabic/reviews-section.md
```

[How Lotline Works](/lotline/getting-started/how-lotline-works/) explains the idea in full. This page is the practical reference: every section, its file, and the block name a page uses to change it.

### Change A Section Everywhere
Edit its file in `src/content/sections/english/` and the file with the same name in each other language folder. The comments in each file list its options and the allowed values.

Section files have no schema, so `npm run astro-check` doesn't catch a wrong value in them, such as a misspelled `layout`. Copy values from the comments, then check the page in the browser.

### Hide A Section
- **Everywhere:** set `enable: false` at the top of its section file.
- **On one page:** add its block to that page's content file with `enable: false`:

  ```yaml
  faqSection:
    enable: false
  ```

### Change A Section On One Page
Add a **named block** to the page's content file with only the keys you want to change. Lotline merges the block over the section file:

- **Objects merge key by key.** A block only needs the fields it changes.
- **Lists replace the whole list.** Repeat every item you want to keep.
- **An empty string (`""`) clears a value**, for example `title: ""` removes a section title on that page.

```yaml
# src/content/homepage/english/home-3.md
listingsSection:
  title: "Homes to rent now" # replaces the title only
  source: "rent" # the other fields keep their section defaults
  options:
    layout: "tabs"
```

Copy block names exactly from the catalog below. They are the keys of `sectionsSchema` in `src/sections.schema.ts`. In a file with a schema, `npm run astro-check` reports a value of the wrong type inside a block. A block name the page doesn't read is ignored without an error.

<Aside type="caution" title="The call to action needs enable: true">
  The call to action band above the footer (`ctaSection`) is off in a page
  block unless the block says `enable: true`. A `ctaSection:` block that changes
  only the title hides the band on that page. Start every `ctaSection:` block
  with `enable: true`, as the sample files do. To hide the band on one page,
  write `ctaSection: { enable: false }`.
</Aside>

The `contact` collection (`src/content/contact/`) has no schema, so blocks in the contact page file are not checked. Open `/contact/` after each change.

### Blocks Each Page Reads
Every page shows the call to action band (`ctaSection`) above the footer, and inner pages open with a page header (`pageHeader`). Paths are for English. The other languages use the same file names in `french/` and `arabic/`.

| Page | Page file (`src/content/`) | Blocks the page reads |
| --- | --- | --- |
| Agency home `/` | `homepage/english/-index.md` | `heroSection`, `logosSection`, `listingsSection`, `videoSection`, `whyUsSection`, `servicesSection`, `reviewsSection`, `enquirySection`, `faqSection`, `ctaSection` |
| Developments home `/home-2/` | `homepage/english/home-2.md` | `heroSection`, `statsSection`, `listingsSection`, `developmentsSection`, `neighborhoodsSection`, `agentsSection`, `reviewsSection`, `blogSection`, `ctaSection` |
| Rentals home `/home-3/` | `homepage/english/home-3.md` | `heroSection`, `listingsSection`, `stepsSection`, `servicesSection`, `whyUsSection`, `enquirySection`, `reviewsSection`, `faqSection`, `ctaSection` |
| Properties `/properties/` | `properties/english/-index.md` | `pageHeader`, `ctaSection`, and `enquirySection`, which is the viewing form on every property page |
| Property page | `properties/english/<home>.md` | The listing fields. The page header is the listing's cover photo. See [Properties](/lotline/customization/properties/) |
| New developments `/developments/` | `developments/english/-index.md` | `pageHeader`, `developmentsSection`, `ctaSection`, and `enquirySection`, which is the sign-up form on every development page |
| Development page | `developments/english/<development>.md` | `ctaSection` (else the one in `-index.md`) |
| Neighborhoods `/neighborhoods/` | `neighborhoods/english/-index.md` | `pageHeader`, `neighborhoodsSection`, `ctaSection`, and `agentsSection`, which is the agents row on every neighborhood page |
| Neighborhood page | `neighborhoods/english/<area>.md` | `ctaSection`. Its questions are the `faq` field |
| Agents `/agents/` | `agents/english/-index.md` | `pageHeader`, `endCard` (the pine tile after the last agent), `ctaSection` |
| Agent page | `agents/english/<agent>.md` | `ctaSection` (else the one in `-index.md`) |
| Services `/services/` | `services/english/-index.md` | `pageHeader`, `servicesSection`, `enquirySection`, `reviewsSection`, `ctaSection`, and `detail`, which every service page shares |
| Service page | `services/english/<service>.md` | `faqSection`, `enquirySection`, `ctaSection`. Its questions are the `faq` field |
| Valuation `/valuation/` | `pages/english/valuation.md` | `pageHeader`, `valuationSection`, `reviewsSection`, `faqSection`, `ctaSection` |
| About `/about/` | `about-us/english/-index.md` | `pageHeader`, `storySection`, `wideImageSection`, `statsSection`, `whyUsSection`, `valuesSection`, `agentsSection`, `enquirySection`, `reviewsSection`, `ctaSection` |
| How it works `/how-it-works/` | `pages/english/how-it-works.md` | `pageHeader`, `stepsSection` (buyers), `sellingStepsSection` (sellers), `wideImageSection`, `statsSection`, `faqSection`, `ctaSection` |
| Reviews `/reviews/` | `pages/english/reviews.md` | `pageHeader`, `reviewsPage` (the summary row), `ctaSection` |
| FAQ `/faq/` | `faq/english/-index.md` | `pageHeader`, `faqSection` (with `groups`), `ctaSection` |
| Contact `/contact/` | `contact/english/-index.md` | `pageHeader`, `contactPage` (offices, hours, form), `logosSection`, `ctaSection` |
| Careers `/careers/` | `careers/english/-index.md` | `pageHeader`, `storySection`, `openRolesSection`, `valuesSection`, `application` (the apply form), `ctaSection` (also on every role page) |
| Blog `/blog/` | `blog/english/-index.md` | `pageHeader`, `blogListSection`, `ctaSection` (also under posts without their own) |
| Blog post | `blog/english/<post>.mdx` | `relatedPostsSection`, `ctaSection` |
| Text pages (legal) | `pages/english/<page>.md` | `pageHeader`, `contentPage` (a notice above the text) |

The section order on each page is set in its route file in `src/pages/[...lang]/`. See [Homepages](/lotline/customization/homepages/) for the three homes.

### Section Catalog
Every section, its content file in `src/content/sections/<language>/`, and the block name a page uses to change it. Layout values are in [Section Layouts](/lotline/customization/section-layouts/).

#### Homepage And Marketing
| Section (component) | Content file | Page block | Used on |
| --- | --- | --- | --- |
| Hero (`HeroSection`) | `hero-section.md` | `heroSection` | The three homes, each with its own layout and search form |
| Logos (`LogosSection`) | `logos-section.md` | `logosSection` | Agency home, contact page |
| Listings (`ListingsSection`) | `listings-section.md` | `listingsSection` | The three homes |
| Video (`VideoSection`) | `video-section.md` | `videoSection` | Agency home |
| Why us (`WhyUsSection`) | `why-us-section.md` | `whyUsSection` | Agency and rentals homes, about |
| Services (`ServicesSection`) | `services-section.md` | `servicesSection` | Agency and rentals homes, `/services/` |
| Steps (`StepsSection`) | `steps-section.md` | `stepsSection`, and `sellingStepsSection` on `/how-it-works/` | Rentals home, how it works |
| Reviews (`ReviewsSection`) | `reviews-section.md` | `reviewsSection` | The three homes, services, valuation, about |
| Inquiry form (`EnquirySection`) | `enquiry-section.md` | `enquirySection` | Agency and rentals homes, services and service pages, about, property pages (viewing form), development pages (sign-up form) |
| FAQ (`FaqSection`) | `faq-section.md` | `faqSection` | Agency and rentals homes, FAQ, valuation, how it works, service and neighborhood pages |
| Numbers (`StatsSection`) | `stats-section.md` | `statsSection` | Developments home, about, how it works |
| Call to action (`CallToAction`) | `call-to-action.md` | `ctaSection` | Above the footer on every page |

#### Listings, Places, And People
| Section (component) | Content file | Page block | Used on |
| --- | --- | --- | --- |
| Developments (`DevelopmentsSection`) | `developments-section.md` | `developmentsSection` | Developments home, `/developments/` |
| Neighborhoods (`NeighborhoodsSection`) | `neighborhoods-section.md` | `neighborhoodsSection` | Developments home, `/neighborhoods/` |
| Agents (`AgentsSection`) | `agents-section.md` | `agentsSection` | Developments home, about, neighborhood pages |
| Valuation request (`ValuationSection`) | `valuation-section.md` | `valuationSection` | `/valuation/` |

The listings, developments, neighborhoods and agents sections take their items from collections, never from the section file. The section file holds the title, the button, how many to show and which ones. See [Properties](/lotline/customization/properties/), [Developments](/lotline/customization/developments/), [Neighborhoods](/lotline/customization/neighborhoods/) and [Agents](/lotline/customization/agents/).

#### Company, Careers, And Blog
| Section (component) | Content file | Page block | Used on |
| --- | --- | --- | --- |
| Story (`StorySection`) | `story-section.md` | `storySection` | About, careers |
| Values (`ValuesSection`) | `values-section.md` | `valuesSection` | About, careers (what you get) |
| Wide photo (`WideImageSection`) | none | `wideImageSection` | About, how it works |
| Open roles (`OpenRolesSection`) | `open-roles-section.md` | `openRolesSection` | `/careers/` |
| Blog teaser (`BlogSection`) | `blog-section.md` | `blogSection` | Developments home |
| Blog list (`BlogListSection`) | `blog-list-section.md` | `blogListSection` | `/blog/`, its pages, category and tag pages |
| Related posts (`RelatedPostsSection`) | `related-posts-section.md` | `relatedPostsSection` | Under each blog post |
| Not found (`NotFoundSection`) | `not-found-section.md` | none | 404 pages |

Three names don't follow the pattern: the call to action is `CallToAction` / `call-to-action.md` / `ctaSection`, the FAQ is `FaqSection` / `faq-section.md` / `faqSection`, and the inquiry form is `EnquirySection` / `enquiry-section.md` / `enquirySection`.

Three more files in `src/content/sections/` belong to site-wide parts: `announcement-bar.md`, the optional strip above the header ([Header](/lotline/customization/header/)), `cookie-consent.md`, the cookie banner ([Cookies & Analytics](/lotline/customization/cookies-analytics/)), and `rating.md`, your average score and review count, read by the reviews sections and the reviews page.

#### Page-Only Blocks
These blocks have no section file. They exist only in page frontmatter:

| Block | Where | What it sets |
| --- | --- | --- |
| `pageHeader` | Any inner page | Breadcrumb, a line under the title, buttons, the band photo, and the layout. See [Section Layouts](/lotline/customization/section-layouts/#page-header) |
| `contentPage` | Text pages in `src/content/pages/` | `notice` (a callout above the text) and `options.numbered` |
| `contactPage` | `contact/english/-index.md` | The office cards, the hours title, and the contact form |
| `reviewsPage` | `pages/english/reviews.md` | The summary row over the reviews: the average, the count, and extra figures |
| `endCard` | `agents/english/-index.md` | The pine tile after the last agent on `/agents/` |
| `detail` | `services/english/-index.md` | The parts every service page shares: the "why us" photo panel, the FAQ title, the inquiry form |
| `application` | `careers/english/-index.md` | The apply form on every role page and on `/careers/#apply` |
| `layoutGallery` | `pages/english/elements.md` | The copy around the `/elements/` previews |
| `primaryCta` | Any page | The main button on this page only: the header button, the announcement link and the footer button (`label`, `url`, `announcement`). See [Common Changes](/lotline/customization/common-changes/) |

### Add A Section To A Page
This is a small code edit in the page's route file in `src/pages/[...lang]/`.

The three homes list their sections in order inside `<Base>`, each wrapped in `LayoutVariants`:

```astro
<LayoutVariants section="hero" content={heroSection} />
<LayoutVariants section="logos" content={logosSection} />
<LayoutVariants section="listings" content={listingsSection} />
```

To add one, add its block name to the `const { ... } = homepageContent?.data` list at the top of the route, add a line in the place you want it, then add the block (with `enable: true`) to the homepage file in every language. The `section` names are the keys in `src/lib/layoutVariants.ts`: `hero`, `services`, `steps`, `reviews`, `cta`, `logos`, `listings`, `video`, `whyUs`, `enquiry`, `faqs`, `stats`, `developments`, `neighborhoods`, `agents`, `blog`. Keep the wrapper when you move a section: it renders it exactly like a direct import.

On other pages, import the component and place it inside `<Base>`:

```astro
---

---
<StatsSection content={entry?.data.statsSection} />
```

Building a brand-new section is a developer task. `AGENTS.md` and `SKILLS.md` explain the rules (one `.astro` component, one content file in each language, and a schema in `src/sections.schema.ts`), so an AI assistant can do it for you.

### Do It With AI
```text
On the page [URL], change the [SECTION] section only for that page: [CHANGES]. Find the page's
content file and the block name in sectionsSchema of src/sections.schema.ts, add a named block
with only the keys that change (lists must repeat every item I keep, and a ctaSection block must
start with enable: true), and do the same in the other language folders. Don't edit
src/content/sections/. Then run npm run astro-check.
```

```text
Add the [SECTION, e.g. stats] section to [PAGE, e.g. /home-3/] after the [OTHER] section.
Add a LayoutVariants line in the route in src/pages/[...lang]/ (on pages that don't use
LayoutVariants, import the component), then add the block with enable: true to the page's
content file in every language folder. Run npm run astro-check.
```