<p>You could use your default "Text" Matrix block type for the sliders and have an extra block type as a "Slide Wrapper", to wrap "Text" (and "Image") blocks which should go into your slider.</p>

<p>See this question for an alternative approach, to recognize succeeding blocks of the same type automatically in the template <a href="https://craftcms.stackexchange.com/a/6739/125">Solution for Matrix-within-Matrix (or More Robust Table Fields)</a>.</p>

CC BY-SA 3.0
2015-04-16T11:14:51.347Z
It is not the most elegant solution to use special block elements to wrap the slider elements but for now it is working fine. Hopefully craft will get nested elements, like structured matrix or a kind of repeater field.
Patte
CC BY-SA 3.0
2015-04-16T11:22:53.460Z
Yep, it's not elegant but as you could make it work to use all your other block types in between, it is very flexible. If you're not liking that extra block you could probably also use a boolean field "Begin / End Slider" that's available on your text block type. Not exactly sure if this would make things more elegant though?
carlcs
CC BY-SA 3.0
2015-04-16T15:15:37.570Z
Ah, I like that boolean field thing! Thanks for that hint.There are just rich text fields in my Text Slider so this would be a good way to clean up.
Patte
CC BY-SA 3.0
2015-04-16T16:35:31.047Z
Hey Patte, if it's only for the text blocks I'd seriously consider the technique Brandon posted (linked question). Then you wouldn't need anything to group them and do it all with Twig magic in your templates.
carlcs
CC BY-SA 3.0
2015-04-17T14:34:39.273Z
You`re right. I addition to that I realized that I will need an image slider, too, so I decided to use wrap elements. It is working very well, thanks much!
Patte
CC BY-SA 3.0
2015-04-15T16:20:23.223Z
2015-04-15T16:20:23.223Z
2017-04-13T12:51:00.253Z
carlcs
<p>in my Sections (Single, Channel and Structure) I am using one matrix field containing typical content elements, Text (One Column), Text (Two Columns), Image, Text-Slider, Image-Slider and so on...</p>

<p>My problem is the Text-Slider with Richtext and links in it. Unfortunately Matrix field doesn't offer any Repeater or Nested Matrix functionality so I don't know how to build the structure for this element.</p>

<p>My Image-Slider is a no brainer , I take an asset field and with every image there is another Richtext field I can use.</p>

<p>The Table field has no Richtext field in it... 
There are a lot of small Text-Sliders all over the website.
Any Ideas? Thanks much! </p>

<matrix>
Text-Slider within Matrix field
# Text-Slider within Matrix field

(Asked by: username_0 on 2015-04-15)

in my Sections (Single, Channel and Structure) I am using one matrix field containing typical content elements, Text (One Column), Text (Two Columns), Image, Text-Slider, Image-Slider and so on...

My problem is the Text-Slider with Richtext and links in it. Unfortunately Matrix field doesn't offer any Repeater or Nested Matrix functionality so I don't know how to build the structure for this element.

My Image-Slider is a no brainer , I take an asset field and with every image there is another Richtext field I can use.

The Table field has no Richtext field in it...
There are a lot of small Text-Sliders all over the website.
Any Ideas? Thanks much!

**Tags:** matrix

---

## 1 answers

### Answer by username_1 on 2015-04-15. Score: 1 | Accepted answer

You could use your default "Text" Matrix block type for the sliders and have an extra block type as a "Slide Wrapper", to wrap "Text" (and "Image") blocks which should go into your slider.

See this question for an alternative approach, to recognize succeeding blocks of the same type automatically in the template [Solution for Matrix-within-Matrix (or More Robust Table Fields)](https://craftcms.stackexchange.com/a/6739/125).

> **Comments:**
> **username_0**: It is not the most elegant solution to use special block elements to wrap the slider elements but for now it is working fine. Hopefully craft will get nested elements, like structured matrix or a kind of repeater field.  
> **username_1**: Yep, it's not elegant but as you could make it work to use all your other block types in between, it is very flexible. If you're not liking that extra block you could probably also use a boolean field "Begin / End Slider" that's available on your text block type. Not exactly sure if this would make things more elegant though?  
> **username_0**: Ah, I like that boolean field thing! Thanks for that hint.There are just rich text fields in my Text Slider so this would be a good way to clean up.  
> **username_1**: Hey Patte, if it's only for the text blocks I'd seriously consider the technique Brandon posted (linked question). Then you wouldn't need anything to group them and do it all with Twig magic in your templates.  
> **username_0**: You`re right. I addition to that I realized that I will need an image slider, too, so I decided to use wrap elements. It is working very well, thanks much!  

---

