Paragraphs

The module offers three items.

Drupal8_001709.png

Paragraphs offers you the possibility to change your content type structure, depending on the content you want ot display. It turns your page into paragraphs. Each of them is a little content type of itself. You can combine it with the regular fields.

Look at Structure...

Drupal8_001708.png

When do you use something like that?

I want to write some content about photomodels (yes.. yes ik know...) Sometimes i have 1 picture, sometimes 2. How to combine that in one content type? I also use Display Suite in this example...

An example will make everething clear..

First the paragraph typ for text and 2 pictures.

Drupal8_001710.png

With these obvious fields..

Drupal8_001711.png

The display in combination with Diplay Suite.

Drupal8_001712.png

Now the other type.. one photo + text.

Drupal8_001713.png

In the content type 'models' i use a multiple paragraph field.

Drupal8_001715.png

Let’s fill in some content…

Drupal8_001716.png

The result (add some CSS please) Mind that depending on the content we can use, i change the paragraph type.

Drupal8_001717.png

If you want to make a view afterwards.. Do use relations.. Here i only use the first photo field..

Drupal8_001718.png

Some people use paragraphs as an alternative for field collection. My personal opinion is that you use paragraphs because of their flexibility. If the (sub)fields you use are always the same, you better use field collection.