Objective
Create a custom component called Slideshow that allows the end user to upload multiple images, each with its own title and description, and render them as a carousel on the frontend.
Implementation
For this example, two components will be created:
- slideshow: Main container component.
- slide_item: Reusable subcomponent that represents each slide in the carousel.
Create the slide_item component (Slide item)
This component will represent each slide in the carousel.
Access the Castorcito menu in the Drupal administration bar.
Click Components, then click the Add Component button.
- Complete the fields for the new component:
- Label: Slide item
- System name: slide_item
- Category: Taylored
- Help text: Allows you to add an image with text to display in a carousel.
- Check “This component is only for use inside a container, hidden in Drupal field widget.”: Checked
Click on the “Create new component” button.
- a