Using The Fragments Application

Fragments provide a way to embed HTML and Javascript in a template, which can then be managed via the admin.

Creating Fragments

There are two steps required for creating a fragment.

Create a fragment object in the admin

First, you will need to create a new fragment at /admin/fragments/fragment/add/ (or by pressing the add fragment or "+" button.

In the Content field, you will add whatever content you would like to display on site. The screenshot below provides a good example of how you can add a link to a page using Javascript:

Add Fragment

Including invalid HTML or Javascript in the Content field of a fragment can cause pages to break. Always validate your code before updating it on your site!

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.