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

# Fragment

{% hint style="info" %}
The `fragment`block is a container (invisible on the front end) to which you can add a `fragment` (containing one or more template parts).
{% endhint %}

This allows you to add one or more template parts wherever you are in your Template, Page, Post etc.    &#x20;

## Add a Fragment Block

* Search for the <img src="/files/sHJscThWb2nW7KToY5IY" alt="" data-size="line"> `button` block in the Quick Inserter or Inserter Panel.
* Click the `fragment` block to insert it into your parent block.

<figure><img src="/files/Fgoah2LYcptCZLl2sGX1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh4.googleusercontent.com/LSgnlI6MXn33fCWd00mLfJuFGThimfPwfcjliPFFgfcu9Dt7D_aXAzheCziVJo8OI9Rr6KlLgrkXvUKGvZmQ6rGpcTlS7hQ2c3NvrRx0OklmUj9f2RVqB-_UvJp2gMcHuzsG8A69tll7HGGTSpa_aNIkFxe1X1qA6nH3Dltvtf0hMWqrrqXfm77BgychEg" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?t=444s&v=Hj4qzIE7OTc>" %}
How To - Global Parts & Fragments
{% endembed %}

## Add a Fragment

You can add a fragment (multiple template parts) to your `fragment` block, such as headers, footers or custom fragments.

### Add Global Header and/or Footer

By default, Global Headers and Footers are available in the Fragment dropdown.

* Select a `fragment` block.
* Choose Global Header or Global Footer in dropdown as required.

<figure><img src="/files/OzfZjLGXdY7LyVJCPBIt" alt=""><figcaption></figcaption></figure>

Alternately:

* Open the Block Inspector.
* Choose required Global Fragment in the dropdown.

<figure><img src="/files/omtLIvK9i7ecq6MP9b0Q" alt=""><figcaption></figcaption></figure>

### Add a Custom Fragment

A Custom fragment can be added from the Cwicly Themer in the Dashboard.

* From the Dashboard, open the Cwicly Themer.
* Open Fragments(top left corner)
* Click "+ Fragment" to open the New Fragment modal.
* Input Fragment name and click Create.

<figure><img src="/files/7hgz8J7zvJyj2pg8eW8A" alt=""><figcaption></figcaption></figure>

* In the Custom section, click the "+" icon next to the Fragment you wish to add.

<figure><img src="/files/ACtXLRpbmHxIngFCqPXn" alt=""><figcaption></figcaption></figure>

* Select the required Custom fragment in the dropdown.

<figure><img src="/files/6aG60FCk4sNTXoFuKksL" alt=""><figcaption></figcaption></figure>

* Select the required Custom fragment in the dropdown in the Block Inspector.

<figure><img src="/files/Ymiw1fqF75bkwV2INBCA" alt=""><figcaption></figcaption></figure>

{% content-ref url="/pages/LKg8ryDi6Vrxo5f3gi5x" %}
[Fragments](/themer/general/fragments.md)
{% endcontent-ref %}
