# About Fragments

# Overview

Fragments (opens new window) is a Craft CMS plugin for managing content and presentational fragments. It allows you to decouple your entry types from content blocks, widgets or components that are ad-hoc or presentational in nature, similar to blocks and regions in Drupal or modules and positions in Joomla.

Fragments

With Fragments comes a set of entities to help you manage content and presentational fragments:

  • Fragment types
    Just like entry types, you can set up the content model and field layout for your fragments.

  • Zones
    Template zones, or simply zones, are areas in your templates in which fragments will be created and displayed. Zones can be limited to allow only specific fragment types.

  • Fragments (element)
    These are the actual content blocks to be displayed. Each fragment can be further customised to be included or excluded in the zones depending on visibility rules.

  • Fragments (custom field)
    The included Fragments field allows your content editors to relate to Fragments in some or all of the zones. This opens up possibility to create reuseable fragments that can be included in entries and content block builders.

# Requirements

Fragments requires Craft CMS 3.6.0 or later.

# Installation

You can install Fragments from the Plugin Store or with Composer.

# From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “Fragments”. Then click on the “Install” button in its modal window.

# With Composer

Open your terminal and run the following commands in your project directory:

# tell Composer to load the plugin
composer require thepixelage/craft-fragments

# tell Craft to install the plugin
./craft install/plugin fragments