1

I am trying to create a carousel where each slide will have a title, subtitle, and maybe a summary.

I know I can create a carousel like this with a set number of slides. I would like to create one where if an image is added the subsequent fields(title, subtitle, and summary) would be made available for that slide. This way I could have as many slides as possible.

I believe this may be accomplishable with Neo since it allows me to go three layers deep into a matrix. Sadly due to the project constraints, we cannot use any Matrix plugins like Neo or Supertables.

Is there any other way to accomplish this without the use of a plugin.

Right now we are using Craft 2. If this is not possible in Craft 2 I would be interested to know if it would be possible in Craft 3.

  1. Is this possible with the limitations set forth
  2. How would this be accomplished
  • 2
    Why don't you use a normal matrix field for this scenario? Each slide will be one block containing the required attributes – Robin Schambach Jun 28 '18 at 20:42
  • Since you referenced Neo and Super Table, I'm guessing you're asking how to nest repeating content blocks inside of a block type in a matrix field? For example, a matrix field for "page content" that has different block types like heading, rich text field, and a "carousel" block type. Then inside of the carousel block, you want a repeating block for each slide with fields for an image, title, description, etc. Is that correct? – Alex Roper Sep 19 '18 at 22:34
1

Old ticket, I know, but thought I'd answer.

Personally, I use a channel for carousel slides as clients for me have tended to mix and match them on multiple places on a site or stop using them then reusing them a few months later.

This way they have a pool of instances of reusable slides that won't disappear. Hopefully saving redoing work they've already done a few months prior.

If I've understood your question, I'd have a channel with two entry types. "Image slide" or "Text slide".

So when they add a new one they can choose if they want one with an image or just text.

Then depending on how you're constructing your pages you just need a Matrix component type that is named 'carousel' with an entries field with the slides channel selected as it's source or just an entries field on it's on in the page entry types you want this carousel to be. (I'd limit it to three or four for UX purposes).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.