Hi there! Welcome to OSU Drupal Droplets!
This is Joe Fenn with Oregon State
University's Web and Mobile Services and
today we're going to continue our
exploration of the Paragraphs module by
taking a look at our Accordion paragraph
bundle. So, the Accordion paragraph bundle gives us the ability to create
collections of question and answer sets
that are collapsible. Furthermore we can
create just a simple collection or we
can create a categorized collection. I'm
gonna show you how to do both of those.
With no further ado, let's get on in and
click our Edit tab and once our edit
form opens up let's scroll on down to
our paragraph section here. In the
Paragraph Type field let's open that up
and choose Accordion and then click the
Add Another Paragraph button so we'll
end up getting a field set with an
Accordion label here. Just click on that
Accordion label and it will open up and
you'll get a series, or a collection
basically, of fields. Here we're going to
ignore the one that says Header Text for
the moment. We'll come back to that in
just a minute. Right now we'll just
create an accordion. So we'll start by
making a Title and I'm just going to
steal a little bit of text here from my
ipsum generator and let's steal a little
more text from my ipsum generator so
there's one accordion group. Maybe I want
to create another Accordion group so I'm
going to Add Another Item. This time
let's grab some of this and we'll make
another Title, a little more text here.
So, for the moment, we'll save this and
see that we have our confirmation there.
Let's scroll down to the bottom of the
page and that right there is our
accordion. So notice when I click on the
title here it expands the body area
beneath it. So maybe you want to create
some type of a, accordion setup where you
have some categorical items in there. We
can do that! That's pretty easy. Let's go
ahead and click the Edit tab again and
we'll just use our existing accordion
here. So we're gonna revise this a little
bit. I will come up here.
Let's grab some more text here and this
is where we will use our header text. So
just go ahead and pop that in. Then,
if I want to make another category, I
just add another Accordion bundle. So I
would create Accordion, click Add Another Paragraph, and this time I will give it a
different header. Let's do this.
We will create a little accordion
inside of here and grab our last bit
content text, paste it into the Content field.
So, let's go ahead and scroll down and
click the Save button. Notice we now
have categorized accordion groups. So,
it's pretty simple! This has been how to
create an Accordion paragraph bundle and
this has been Joe Fenn with Oregon State
University's Web and Mobile Services. I
hope to see you in future tutorials.
