Accordions
Accordions are a common web interface that allows the presentation of text, links, or media in a stack of vertical elements. Each accordion can be selected and will expand to show hidden content. Engineering Web Services created a basic offering as well as customizable enhancements from which you can choose to refine your content's presentation.
Set up
To add accordions to your website:
Navigate to the page, news article, or event.
Choose layout.
Select the "Add block" link from the section of your site.
Choose the "Create Custom Block" button.
Choose Accordions from the list of custom blocks.
The title is required but it's display is not.
Choose "Add new accordion panel".
The "Accordion Header" field is required as this is the text that will appear on the unexpanded accordion.
The "Accordion Panel" field is a rich content editor through which you can add text, links, and media.
Once you are satisfied with your accordion, press the "Create Accordion panel" button.
You may add as many accordions as you like, just be cognizant of space and context.
You can reorder the accordions through the "sort order" cross icons.
Base Configuration
Once you have created your accordions the default display is to allow only one accordion to be open at a time. The following accordion block is configured in this manner. Experiment with this configuration to see if it suits your use.
Accordions
Arcu dictum varius
Nulla aliquet porttitor
Rhoncus dolor purus
Magnis dis parturient montes
Allow Multiple Accordions to Be Open
This checkbox will allow a site visitor to expand the accordions without the previously expanded accordion collapsing. This settings has been applied to the following accordion block. Experiment with it's functionality to see if it fits your use case.
Accordions
Volutpat maecenas volutpat blandit aliquam etiam erat velit
Parturient montes nascetur ridiculus
Ultrices neque ornare aenean
Egestas sed tempus urna
Start With 1st Item Open
This checkbox allows the first accordion to display in it's expanded state. This can either be in conjunction with the "Allow Multiple Accordions to Be Open" checkbox or without it. The following accordion block shows the former option.
Accordions
Augue mauris augue
Egestas quis ipsum
Lacus sed viverra
Curabitur vitae nunc
Start With All Items Open
This configuration allows all of the accordions to be exapanded upon visiting the page. It requires that the "Allow Multiple Accordions to Be Open" checkbox is selected in conjunction with the "Start With All Items Open" checkbox selected. The following accordions block showcases this option.
Accordions
Commodo odio aenean sed
Sit amet purus gravida
Fermentum iaculis
Aliquam eleifend mi in nulla
Custom Classes
Engineering Web Services configured a range of custom classes. When applied to accordions they allow refinement of presentation. Please see a list of the options on the Custom Blocks Custom Classes page. Examples of each follow this block of content.
Block Title Centered
Magnis dis parturient
Block Title Right
Velit euismod
Panel Background White
bibendum arcu vitae elementum
Panel Background Gray
tristique senectus
No Arrow
apien pellente
No Border Surrounding Expanded Element
mauris vitae ultricies
Header Background Dark
adipiscing tristique
Header Background Gray
Proin sed libero eni
Highlight First Accordion
roin sed libero enim
Ultrices dui sapien ege
Highlight Second Accordion
Semper auctor neque
Sed blandit libero volutpat sed
Highlight Third Accordion
adipiscing diam donec adipiscing
Arcu dictum varius
Suspendisse ultrices gravida
Highlight Fourth Accordion
porttitor lacus luctus accumsan
Lacus sed viverra
Dignissim diam quis
Lectus quam id leo
Highlight Fifth Accordion
Tempor orci eu lobortis elementum
Tincidunt tortor aliquam
arturient montes
Bibendum est
Elementum nisi quis
Highlight SixthAccordion
Eleifend donec pretium
dignissim cras
Bibendum est
eleifend donec pretium
blandit aliquam etiam
Bibendum ut
Highlight Even Accordions
tristique et egestas quis ipsum suspe
Libero nunc consequat interdum
Lectus nulla at volutpat diam ut.
Porttitor massa id neque aliquam
Highlight Odd Accordions
Leo a diam sollicitudin tempor id.
At consectetur lorem
vestibulum morbi blandit
Dapibus ultrices in iaculis
Ut enim blandit volutpat
Plain Accordions
Arcu risus quis
Nibh praesent tristique magna sit amet
Ornare arcu odio ut
Varius sit amet mattis
Contact Us
Phone: (614) 688-2828
Email: etshelp@osu.edu
Virtual Helpdesk:
ets.osu.edu/vhd (opens Zoom)
M-F 9:00 A.M.-12:00 P.M.
M-F 1:00 P.M.-4:00 P.M.
Service Desk Locations:
1012 Smith Lab
244 Hitchcock Hall
Business Hours:
M-F 8:00 A.M.-5:00 P.M.
View My Tickets & Requests:
go.osu.edu/etsportal (external site)
Looking for something specific?
Check our Service Catalog Quick Reference Guide