On this page
Paragraphs Template Theming
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:
- paragraphs_item__[view_mode] (e.g. paragraphs-item--default.tpl.php)
- paragraphs_item__[type] (e.g. paragraphs-item--image.tpl.php)
- 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
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion