> 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="https://3250709389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS33S0eoYwMaMrLb7T_%2Fuploads%2FIFujNW2w7vGBWle7QUxI%2Ffavicon-black%20(1).png?alt=media&amp;token=7217d37c-7da0-48b5-a775-e14b6e5de2f4" 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="https://3250709389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS33S0eoYwMaMrLb7T_%2Fuploads%2FIGWXdKa1hQWDCsFRcBrQ%2FScreenshot%202023-08-17%20at%2011.36.02%202.png?alt=media&amp;token=decc1fc4-c261-4bd1-8500-a146fa393cf4" 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="https://3250709389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS33S0eoYwMaMrLb7T_%2Fuploads%2FVRRaLPgFzTRxg3c33hqA%2FScreenshot%202023-08-18%20at%2011.08.47.png?alt=media&amp;token=1fdea9ba-9f5e-4616-bcd9-dcf4c00ce664" alt=""><figcaption></figcaption></figure>

Alternately:

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

<figure><img src="https://3250709389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS33S0eoYwMaMrLb7T_%2Fuploads%2FeNAr32R3ExxlhBo8khms%2FScreenshot%202023-08-18%20at%2011.10.42.png?alt=media&amp;token=f71c25fe-266c-4080-9562-77bf7d2fd0fc" 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="https://3250709389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS33S0eoYwMaMrLb7T_%2Fuploads%2FmoidiLXmXLfLQzxMVHw6%2FScreenshot%202023-08-18%20at%2011.20.48.png?alt=media&amp;token=fe6ddd92-ff64-49f2-a572-e795433e7d41" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3250709389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS33S0eoYwMaMrLb7T_%2Fuploads%2FCa5KghUbqEZCI3VIMgZd%2FScreenshot%202023-08-18%20at%2011.24.36%202.png?alt=media&amp;token=01b89c17-1248-4ab0-ad91-fe83a6260387" alt=""><figcaption></figcaption></figure>

* Select the required Custom fragment in the dropdown.

<figure><img src="https://3250709389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS33S0eoYwMaMrLb7T_%2Fuploads%2FGhJV8CoYuBB8PZiuvUmM%2FScreenshot%202023-08-18%20at%2011.25.50.png?alt=media&amp;token=5d208314-f0a9-4965-8302-25ab4483a1cd" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3250709389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS33S0eoYwMaMrLb7T_%2Fuploads%2FczeCLeGzNfZs9CByQclM%2FScreenshot%202023-08-18%20at%2011.32.32.png?alt=media&amp;token=ba4ac69a-130e-4f30-8222-e3a7f1296149" alt=""><figcaption></figcaption></figure>

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