Drupal Paragraph Module: Know Everything Here!

Drupal Paragraph Module: Know Everything Here!

Drupal Paragraph Module

Creating material in the form of paragraphs is a novel approach. Because of this, site builders are able to make things more aesthetically pleasing, and end users have access to greater editing capabilities.

In Drupal, the “Drupal Paragraphs” module is extremely popular and is employed for the management of material. It is comparable to content fields and offers a diverse selection of choices for designs, layouts, and the grouping of content in accordance with the needs.

Types of Drupal Paragraphs & Its Usage?

Different kinds of paragraphs can be used within Drupal. They can take the form of anything, from a still image to a moving video, from a straightforward text to an adaptable slideshow. 

We are able to define numerous Paragraphs Types with distinct organizational schemes as an alternative to putting all of the data in a single body field. This gives the end user the ability to select their preferred Paragraph Type from among those that have been predefined. We are able to construct numerous featured paragraphs by utilizing Drupal’s Paragraphs module. This gives end users the option to select the paragraph that is best suited to meet their requirements. 

Non-technical users will have no trouble with the Drupal Paragraphs module, while Drupal developers will appreciate the flexibility to alter the appearance of the elements at the theme level.

Steps to use the Paragraphs module in Drupal 9

1. Install and Enable Drupal Paragraphs module

On the paragraph Drupal page, you will be able to get information not only about the module but also about the most recent version of the module.

In order to install the paragraph module using composer, run this command:

a requirement for a composer to use drupal or paragraphs

After the module has been installed. You have to extend the paragraph module and make it active.

paragraphs

The Entity reference revisions module is required in order for the Paragraph module to function properly. Together with the paragraph module, we need to make sure that the Entity reference revisions module is enabled.

field type

Under each paragraph, we have submodules that, depending on the requirements, can be turned on or off.

submodules

The Paragraphs demonstration, the Paragraphs library, the Paragraphs report, and permissions for the Paragraphs type. You will have an overview of the module’s use scenario once you read the description.

2. Create a Paragraphs Type

  • To add a paragraph type go to Structure > Paragraph types (/admin/structure/paragraphs_type) and click on Add paragraph types.

add paragraph type

  • Complete the necessary fields in order to create a new paragraph type. The Label section must be filled out, but you may choose whether to include icons or descriptions instead. Simply by pressing the “edit” button, we are able to alter the “machine name” of the “paragraph type.” After you have finished filling in the forms, click the Save and manage fields button.

3. Add fields to the paragraph type

It is possible to add fields to a paragraph type in the same way that fields can be added to a content type.

When you click the Save and manage fields button, you will be sent to the tab labeled manage fields.

  • To add a field, use the Add Field option under Manage Fields. Here, we have the option of creating a new field or making use of the one that already exists.
  • Choose the sort of field it is, enter a label for it, and then adjust the settings for the field so they meet your needs. Adding fields in the content type works in the same way as described here.
  • According to the specifications, we are able to add any amount of fields.

manage field

  • Following the addition of the field, the list of fields that have been added is now visible in the manage display form.

manage form display

In the manage form display tab, we have the ability to modify the order of the fields in the form display as well as the configurations of those fields. To modify the order of the fields, click and drag the corresponding fields, and to change the configuration, click the settings icon that is located on the right end of each field.

manage display

  • In the manage display tab, we have the opportunity to adjust the order as well as the format of the field value that is displayed when we are presenting the paragraph. You can modify the order of the fields by clicking and dragging them, and you can change the format of the fields by clicking on the dropdown arrow next to the format and selecting a new format that corresponds to the needs of each individual field. We have the capability of aligning the label of the field as well as making it invisible on the display. These choices can be found in the Label drop-down menu.
  • If the site supports many languages, we can translate the paragraph type using the Translate paragraphs type tab. If the site supports multiple languages, we can also clone the paragraph type using the clone tab, where we will need to provide a new label for the cloned paragraph.

4. Add paragraphs to the content type

In order to incorporate paragraphs into a content type, we need to first establish a field of type entity reference revision. This field will allow us to refer to different paragraph types contained within the content type.

  • Structure > Content types is where you’ll find the option to add the field. To add paragraph type, select the content type’s manage fields tab and then click the appropriate button.
  • Select the Fields to Add option. Choose the paragraph that is located under Reference Revisions, and then give the field a title.

taxonomy term

add field

  • Click on Save and continue.

item to reference

  • In this section, you have the opportunity to establish a limit for the field. If we want to add only one set of values for the paragraph, we need to make sure that the Allowed number of values is set to limited and then choose the number that shows after selecting the limited option. After you’ve chosen the limit, make sure to click the “save field settings” button.

reference method

  • If we click the save field settings button, we will be taken to a screen where we can choose the type of paragraph that should be added to the content type that has been chosen. Under “Paragraph types,” you’ll see a list of every sort of paragraph that you generate. Here, we have two options: one is to pick the paragraph kinds, and the other is to select the option to omit the selected below; doing so will enable the paragraph types that have not been selected. The second option is to check the box labeled “Include the selected below,” which will turn on the paragraph types that have been chosen from the list. After choosing the different sorts of paragraphs, make sure to click the “Save Settings” button at the very end.
  • In the manage form display of the content type to which the field is added, there will be a list of available field widgets for the entity reference revisions field. You can select one of these field widgets to apply to the entity reference revisions field.

5. Add content to the paragraphs

  • To add the content, select Content > Add content from the navigation menu. Choose the sort of information that will have the paragraph added to it.

paragraph blog

  • The paragraph type will be added, along with all of the fields that are associated with the paragraph. Clicking the “Add” button that is located next to the paragraph’s name (shown as “Add Blog” in the example to the right) will cause a new paragraph of the same kind to be added to the document. To delete the paragraph, select the three dots button that is located next to the collapse, and then select the Delete option. In addition, the replicate button can be used to reproduce the text.
  • Once you have finished adding content to the paragraph, save the node.

Features of Drupal 9 Paragraphs module

  • Provides the editor with the ability to design unique structures for each page.

Utilizing Drupal paragraphs is an option where there are multiple logical divisions on a single page or across multiple pages. For illustration purposes, there is a slideshow below an image that has text superimposed on it. We can make this process more straightforward by utilizing Drupal Paragraphs.

  • Provides the editor with the ability to rearrange the paragraphs in the document.

If there is a change in display, for example, there might currently be a picture on top, followed by the title, and the description might be below that. However, you might want to switch the order so that the title is on top, then the image, and then the description. Using Drupal’s paragraphs makes these sorts of edits simple to do. 

You can modify the display order of all of the material wherever the paragraph is used by going to the “manage display” section of the paragraphs that are being used and changing the order there.

  • It is possible to nest paragraphs.

It is possible to make a reference to a previous paragraph field in a subsequent paragraph field when using Drupal. When adding fields to paragraphs, choose “Paragraph” from the “Reference revisions” drop-down menu and then choose the type of Drupal paragraphs to which you would like to add them.

Conclusion

Were you able to learn about the Drupal paragraph module through this post? However, if you are looking for a Drupal development company, then you should check out Appic Softwares. We have an experienced team of Drupal developers that can help you easily manage Drupal modules and more.

You can even hire dedicated Drupal developers from us and manage your project. So, what are you waiting for?

Conatct us now!

Get Free Consultation Now!


    Contact Us

    Consult us today to develop your application.

      Get in touch with us


      Skype Whatsapp Gmail Phone