---
url: https://docs.artemsemkin.com/velum/html/developers/use-in-a-cms.md
description: Move the template into a CMS or a folder one directory deeper.
---

# Use in a CMS

Every address in the pages is relative: `css/main.css`, `js/app.js`, `assets/images/…`, `studio.html`. Nothing is addressed from the root of the server, so the HTML folder works wherever you put it, at the top of a domain or in a folder of its own such as `example.com/clients/velum/`. The scripts find their files from their own place: `js/manifest.js` resolves the address of every component's script against its own, so the components load from `components/` whatever the page's address.

## How to access

**Any page → `<head>`**, and the CMS's template that prints the page

## Putting the folder one directory deeper

Upload the HTML folder's contents into the folder, and open its `index.html` there. Nothing needs an edit. A copy served from `/clients/velum/` loaded its components, visited Studio and Works through AJAX transitions, and left the console silent.

## Printing the pages from a CMS

A CMS prints each page from its own template, often at an address that looks like a folder (`/about/`), where a relative `css/main.css` would point at `/about/css/main.css`. Keep the template's files in one folder of the site, and write their addresses in the CMS template from the site's root:

```html
<link rel="stylesheet" href="/velum/css/vendor.css" />
…
<script src="/velum/js/manifest.js" defer></script>
<script src="/velum/js/app.js" defer></script>
```

The same goes for pictures under `assets/`. The scripts then load as they do in the HTML folder: a page printed at `/cms/about/` with its head pointing at another folder ran its components, and its links visited the template's pages through AJAX transitions.

For AJAX transitions between the CMS's pages, each page must keep what a page of the template has: the same head on every page, and the three regions, a `<header>`, a `<main>` and a `<footer>` that carry `data-arts-ajax-region` with their attributes as the template prints them, the `<main>` with `id="page-wrapper"`, and the sections inside `<div id="page-wrapper__content">`. Copy the markup of the parts you use from the template's pages, notes included: [How a page is built](../pages/how-a-page-is-built). Code that must run on each page goes into `onPage()`, since the head runs once: [AJAX transitions and your own scripts](../settings/ajax-transitions-and-your-own-scripts).

::: tip From the SOURCE toolkit
The partials in `SOURCE/src/partials/` print each part's markup from its props, which makes them a reference for a CMS template: [Pages and data](./pages-and-data).
:::

Next: [AI assistants](./ai-assistants).
