> ## Content Index
> Fetch the complete content index at: https://getpublii.com/dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# Introduction - partials

- URL: https://getpublii.com/dev/introduction-partials/
- Published: 2017-08-04T22:44:16.939Z
- Updated: 2025-01-06T08:52:33.341Z
- Description: Partials are reusable fragments of your website's code, placed in separate files to simplify development and maintenance. They are located in the partials directory of…
- Author: Tomasz Dziuda
- Tags: Partials

Partials are reusable fragments of your website's code, placed in separate files to simplify development and maintenance. They are located in the **partials** directory of your theme.

### Loading a Partial

You can load a partial using the following syntax:

```handlebars
{{> head}}
```

The above code loads the **partials/head.hbs** file.

### Common Partials in Publii Themes

Every Publii theme typically uses uses several partials, e.g.:

-   [head.hbs](#INTERNAL_LINK#/post/79) - Marks the beginning of every page.
-   [footer.hbs](#INTERNAL_LINK#/post/80) - Marks the ending of every page.
-   [menu.hbs](#INTERNAL_LINK#/post/130) - Defines the menu structure.
-   [pagination.hbs](#INTERNAL_LINK#/post/81) - Handles pagination.

The **menu.hbs** and **pagination.hbs** partials are optional. If these files do not exist in your theme, Publii provides default versions.

You can also define your [custom partials](#INTERNAL_LINK#/post/73), which should also be placed in the **partials** directory.

### Support for Partials in Subdirectories

Partials located in subdirectories allow developers to organize their templates better and maintain cleaner project structures.

```apacheconf
theme/
|
├── assets/
|
├── partials/
│   ├── header/
│   │   ├── logo.hbs
│   │   ├── navigation.hbs
│   │   └── search.hbs
│   ├── footer/
│   │   ├── copyright.hbs
│   │   ├── links.hbs
│   │   └── social.hbs
│   ├── blog/
│   │   ├── post-meta.hbs
│   │   ├── post-excerpt.hbs
│   │   └── post-tags.hbs
│   └── shared/
│       ├── pagination.hbs
│       └── notifications.hbs
|
└── index.hbs
└── config.json
└── post.hbs
└── page.hbs
```

In your templates, you can reference partials using their subdirectory paths:

```handlebars
{{> header/logo }}
{{> shared/breadcrumbs }}
{{> footer/social }}
```
