It would be great to have a field formatter that displays as a slider several image fields (and other text fields) stored into one single node using the Paragraphs module.

I'm thinking about the following idea:
- Create a content type named Slider.
- It would contain only one field inside: "slide" — just referencing a paragraph field which will have several subfields inside it.
- This referenced paragraph field will be set to allow multiple values, so we can add several instances of this field into the same node using the "add more..." feature.

Then, that paragraph field would be a collection of several fields:
- image
- texts (title and description for the caption)
- link to a URL
- etc.

If we edit the node and we add several instances of the paragraph field, we will save inside the node several slides and all their related info for each one (e.g., a title for the slide, a description, a link and so on). These are all the elements we need to display a full slider from one node.

In other words, we will have only one slider per node (we will save one full slider inside one single node). No more series of nodes with only one slide per node to build sliders.

Moreover, just editing a node to build a slider would ease a lot the task for authenticated users with any access to the administration area or Views, nor other aditional permissions.

Currently, you can use Wiews to easily build a slider from Paragraphs creating the struture of fileds described above. You will simply need to build a View showing Paragraphs instead of Contents (nodes) and in your page or block choose "Slider Pro" as the Display format. When you add to your View the image field, display it just as a normal image, not as another slider within your main slider. You will see that you can retrieve all the fields contained into the paragraphs. As the images will display as a slider now, you will need to work a little with CSS to display the text fields as desired.

However, from the Display Manager in my Content Type named "Slider", I also can get all that subfields from paragraphs and my node can display them correctly (see below my first attached image), but obviously I don't have any image field here to apply the Slider Pro formatter, I just have one paragraphs field. So, I will need a special Slider Pro formatter applied to Paragraphs subfields to be able to properly display the images subfields contained inside it as a slider.

image_01

In the attached images 2 and 3 I'm showing you the "Manage Display" strictire of my Paragraph type and my Content Type respectively.

image_02

I guess I will need an aditional formatter here (in the "Manage Display" tab of my Content Type) to be able to display Paragraphs subfields as a slider:

image_03

Would it be easy to create that formatter?
Thanks in advance!

CommentFileSizeAuthor
#4 image3.png9.08 KBmanumad40
#4 image2.png36.23 KBmanumad40
#4 image1.png659.3 KBmanumad40
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

manumad40 created an issue. See original summary.

manumad40’s picture

Issue summary: View changes
manumad40’s picture

Issue summary: View changes
manumad40’s picture

Issue summary: View changes
FileSize
659.3 KB
36.23 KB
9.08 KB
manumad40’s picture

Title: Support for Paragraphs module » Formatter to display Paragraphs subfields as a slider
Issue summary: View changes
manumad40’s picture

Issue summary: View changes
manumad40’s picture

Issue summary: View changes
manumad40’s picture

Issue summary: View changes
manumad40’s picture

For now, I've done exactly what I wanted combining the modules Slick and Slick Paragraphs.

The last one includes a formatter called Slick Paragraphs Vanilla to display the content type as a Slick slider.

I think it would be easy to adapt the Slick Paragraphs Vanilla formatter to Slider Pro.

I'm not a coder, but I'm glad to see that what I had imagined is fully feasible.

robin.ingelbrecht’s picture

Good idea, I will look into it when I find some spare time :)