> For the complete documentation index, see [llms.txt](https://documentation.siteglide.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.siteglide.com/site-manager/templates.md).

# Templates (Pages & Email)

Templates are used for organising the repeatable content you will want to display on multiple pages, including Headers and Footers. You can also use Templates for Emails.

## Introduction

Page Templates are used to easily and consistently apply the same global content to pages, such as: Headers, Footers, Global Stylesheets and Analytics Tracking Scripts.

You can find Templates under Site Manager:

<figure><img src="https://584571746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft7n2OYNNUr9PgpkBD2eX%2Fuploads%2Fgit-blob-d0aa6065039f878e34835594e83d97d72ab6824d%2FSiteglide-Site-Manager-Page-Templates-List.png?alt=media" alt=""><figcaption></figcaption></figure>

We recommend editing Templates via CLI but the Toolbox feature is useful when inserting Siteglide features/code:

<figure><img src="https://584571746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft7n2OYNNUr9PgpkBD2eX%2Fuploads%2Fgit-blob-dd155dd7d13d8bd4ab94d6fbc463391cfefbf559%2FSiteglide-Site-Manager-Page-Template.png?alt=media" alt=""><figcaption></figcaption></figure>

## An Example Page Template

Page content will be outputted where the liquid tag `{{content_for_layout}}` is located within your Template.

Here is how a generic Page Template file should be structured:

```liquid
{% include 'site/constants' -%}
<!doctype html><html lang="en">
  <head>
    {% include 'code_snippet', item: '1', name: 'SEO' -%}
    {% include 'code_snippet', item: '2', name: 'HTML Head' -%}
  </head>
  <body>
    <section id="visualEditor" style="display: none">
      {% include 'site/visualEditor'-%}
    </section>
    {% include 'header'
       template: "1"
       header_image: "images/fido/logo-white-bg.svg"
       group_id: "11149" -%}
    <main>
      {{content_for_layout}}
    </main>
    {% include 'footer', template: "1" -%}
    {% include 'site/visualEditor' type: 'js'-%}


  </body>
</html>

</div>
```

While editing a Page, you can assign a Template using the Page Template drop down and then clicking Save.

Note: Toolbox functionality will soon be added to the templates section of Admin, allowing you to easily select elements to add to the page.
