---
title: "Website"
description: "Pages et formulaires. Chaque application est un module sur un même modèle de données."
canonical: "https://obop.dev/fr/apps/website/"
lang: "fr"
---

# Website

## À quoi elle sert

Hold the content of a public website: pages, menus, blog posts and the form submissions visitors send. This app stores and organises content; something else renders it. Publishing needs approval.

## Ce que fait et ne fait pas le paquet

Content for a public website: pages with a slug and a draft, published, archived flow, navigation menu items, blog posts with a byline and a publish date, translations of both, and the form submissions visitors send in. When the instance runs with the public site enabled it serves the published content to visitors as a server-rendered website with SEO and no login; only the fields marked public are ever visible to them. Publishing makes content public and needs a human approval, agents may only propose it. Senders are personal data and are never public.

## Modèles

### `website_page`

A page of the website

Groupe de lecture: `website.user`. Groupe d'écriture: `website.user`.

| Champ | Type | Classe de données | Données personnelles | Groupe | Vu par les agents | Description |
|---|---|---|---|---|---|---|
| `title` | text | `none` | non | `website.user` | en clair | Page title |
| `slug` | text | `none` | non | `website.user` | en clair | URL path of the page without slashes at the ends, lowercase with dashes, for example about-us. The page with slug home is the front page |
| `body` | longtext | `none` | non | `website.user` | en clair | Page content in Markdown (a safe subset: headings, lists, links, emphasis, code, quotes, tables) |
| `seo_title` | text | `none` | non | `website.user` | en clair | Title shown in search results; empty means the page title |
| `seo_description` | text | `none` | non | `website.user` | en clair | Description shown in search results |
| `published_on` | date | `none` | non | `website.user` | en clair | Day the page went public (YYYY-MM-DD) |
| `state` | select (draft, published, archived) | `none` | non | `website.user` | en clair | Page status: draft, published, archived |

### `website_menu_item`

An entry of the site navigation

Groupe de lecture: `website.user`. Groupe d'écriture: `website.manager`.

| Champ | Type | Classe de données | Données personnelles | Groupe | Vu par les agents | Description |
|---|---|---|---|---|---|---|
| `label` | text | `none` | non | `website.user` | en clair | Text shown in the menu |
| `url` | text | `none` | non | `website.user` | en clair | Where the entry leads: a page slug starting with a slash or a full address |
| `parent_id` | ref → website_menu_item | `none` | non | `website.user` | en clair | The entry this one is nested under; empty for a top-level entry |
| `sequence` | number | `none` | non | `website.user` | en clair | Order among its siblings, lowest first |
| `visible` | bool | `none` | non | `website.user` | en clair | Whether the entry is shown |
| `new_window` | bool | `none` | non | `website.user` | en clair | Whether the link opens in a new window |

### `website_blog_post`

A blog post

Groupe de lecture: `website.user`. Groupe d'écriture: `website.user`.

| Champ | Type | Classe de données | Données personnelles | Groupe | Vu par les agents | Description |
|---|---|---|---|---|---|---|
| `title` | text | `none` | non | `website.user` | en clair | Post title |
| `slug` | text | `none` | non | `website.user` | en clair | URL part of the post, lowercase with dashes |
| `author_name` | text | `public_directory` | oui | `website.user` | masqué | Name of the author, for the team's own records |
| `byline` | text | `none` | non | `website.user` | en clair | Author line shown publicly, for example the team or brand name; use a name here only if the person agreed to it |
| `summary` | text | `none` | non | `website.user` | en clair | Teaser shown in listings |
| `body` | longtext | `none` | non | `website.user` | en clair | Post content in Markdown (a safe subset: headings, lists, links, emphasis, code, quotes, tables) |
| `tags` | text | `none` | non | `website.user` | en clair | Comma-separated tags, for example news,product |
| `published_on` | date | `none` | non | `website.user` | en clair | Day the post is dated (YYYY-MM-DD) |
| `state` | select (draft, published, archived) | `none` | non | `website.user` | en clair | Post status: draft, published, archived |

### `website_form_submission`

A message a visitor sent through a form on the site

Groupe de lecture: `website.user`. Groupe d'écriture: `website.user`.

| Champ | Type | Classe de données | Données personnelles | Groupe | Vu par les agents | Description |
|---|---|---|---|---|---|---|
| `form_name` | text | `none` | non | `website.user` | en clair | Which form it came from, for example contact |
| `sender_name` | text | `internal` | oui | `website.user` | masqué | Name the visitor gave |
| `sender_email` | text | `internal` | oui | `website.user` | masqué | Email address the visitor gave |
| `sender_phone` | text | `internal` | oui | `website.user` | masqué | Phone number the visitor gave |
| `message` | longtext | `internal` | oui | `website.user` | masqué | What the visitor wrote |
| `source_page` | text | `none` | non | `website.user` | en clair | Slug of the page the form was on |
| `submitted_on` | date | `none` | non | `website.user` | en clair | Day of the submission (YYYY-MM-DD) |
| `consent_given` | bool | `none` | non | `website.user` | en clair | Whether the visitor ticked the consent box for being contacted |
| `state` | select (new, handled, spam) | `none` | non | `website.user` | en clair | Handling status: new, handled, spam |

### `website_page_translation`

A page translated into another language; the public site shows it to visitors who read that language

Groupe de lecture: `website.user`. Groupe d'écriture: `website.user`.

| Champ | Type | Classe de données | Données personnelles | Groupe | Vu par les agents | Description |
|---|---|---|---|---|---|---|
| `page_id` | ref → website_page | `none` | non | `website.user` | en clair | The page this translates |
| `lang` | select (en, de, fr, pl, fi, sv, es) | `none` | non | `website.user` | en clair | Language of the translation: en, de, fr, pl, fi, sv or es |
| `title` | text | `none` | non | `website.user` | en clair | Translated page title |
| `body` | longtext | `none` | non | `website.user` | en clair | Translated page content in Markdown |
| `seo_title` | text | `none` | non | `website.user` | en clair | Translated title shown in search results |
| `seo_description` | text | `none` | non | `website.user` | en clair | Translated description shown in search results |
| `published` | bool | `none` | non | `website.user` | en clair | Whether the translation is shown; it is only reachable while its page is published |

### `website_blog_post_translation`

A blog post translated into another language

Groupe de lecture: `website.user`. Groupe d'écriture: `website.user`.

| Champ | Type | Classe de données | Données personnelles | Groupe | Vu par les agents | Description |
|---|---|---|---|---|---|---|
| `post_id` | ref → website_blog_post | `none` | non | `website.user` | en clair | The post this translates |
| `lang` | select (en, de, fr, pl, fi, sv, es) | `none` | non | `website.user` | en clair | Language of the translation: en, de, fr, pl, fi, sv or es |
| `title` | text | `none` | non | `website.user` | en clair | Translated post title |
| `summary` | text | `none` | non | `website.user` | en clair | Translated teaser |
| `body` | longtext | `none` | non | `website.user` | en clair | Translated post content in Markdown |
| `published` | bool | `none` | non | `website.user` | en clair | Whether the translation is shown; it is only reachable while its post is published |

## Flux de travail

### `website_page`

| Action | Transition | Qui peut l'exécuter | Approbation |
|---|---|---|---|
| `website_page.publish` | state: draft → published | `website.manager` | oui |
| `website_page.unpublish` | state: published → draft | `website.manager` | non |
| `website_page.archive` | state: published → archived | `website.manager` | non |

### `website_blog_post`

| Action | Transition | Qui peut l'exécuter | Approbation |
|---|---|---|---|
| `website_blog_post.publish` | state: draft → published | `website.manager` | oui |
| `website_blog_post.unpublish` | state: published → draft | `website.manager` | non |
| `website_blog_post.archive` | state: published → archived | `website.manager` | non |

### `website_form_submission`

| Action | Transition | Qui peut l'exécuter | Approbation |
|---|---|---|---|
| `website_form_submission.handle` | state: new → handled | `website.user` | non |
| `website_form_submission.mark_spam` | state: new → spam | `website.user` | non |

## Groupes de permissions

Groupes utilisés par cette application :

- `website.manager`
- `website.user`

## Étapes d'approbation

Étapes qu'un agent ne peut que proposer :

- `website_page.publish`
- `website_blog_post.publish`

## Ce que les agents peuvent et ne peuvent pas faire

Un agent peut lire, rechercher, créer et modifier les enregistrements de cette application, et exécuter les actions qui ne requièrent pas d'approbation, dans les limites des groupes de permissions de son jeton.

Il ne peut que proposer ces étapes, qu'une personne doit approuver : `website_page.publish`, `website_blog_post.publish`, `website_page.delete`, `website_menu_item.delete`, `website_blog_post.delete`, `website_form_submission.delete`, `website_page_translation.delete`, `website_blog_post_translation.delete`.

Les données personnelles sont masquées sous forme de jetons de substitution : `website_blog_post.author_name`, `website_form_submission.sender_name`, `website_form_submission.sender_email`, `website_form_submission.sender_phone`, `website_form_submission.message`.

## Dépendances

Aucune.

## Installation

Installez-la depuis l'application Customize (Place de marché), ou en ligne de commande :

```bash
obop modules install-from website
```

Nécessite une base de données et des droits d'administrateur.

## Créer la vôtre

[Le guide des modules montre comment sont écrites les applications de ce type](/fr/docs/reference/module-manifest/)
