Paragraphs Template Theming

Last updated on
30 April 2025

You are browsing documentation for an older version of Drupal, which is not supported any longer, and the information may not be correct. See current documentation for Contributed modules

Documentation below pertains to overwriting Paragraphs entity display using the theme template override. Be sure you're familiar with template tpl.php overwriting in your (sub-)theme before continuing.

Template Overrides

The default paragraphs template is located at paragraphs-item.tpl.php.

It uses theme suggestions for overwriting the template. The following suggestions are available:

  1. paragraphs_item__[view_mode] (e.g. paragraphs-item--default.tpl.php)
  2. paragraphs_item__[type] (e.g. paragraphs-item--image.tpl.php)
  3. paragraphs_item__[type]__[view_mode] (e.g. paragraphs-item--image--default.tpl.php)

See the associated comment below for more information on template file naming.

Printing Individual Fields

You can see how to print the entire bundle in the default template, but you can also print and theme individual fields in the bundle with the following:

<?php print render($content['field_machine_name']); ?>

Help improve this page

Page status: Not set

You can: