Ben's tips: Putting accordions EVERYWHERE
I get a LOT of questions from my users about how to use Igloo. Some of these questions are interesting enough to share widely. I'll try and remember to post some of the questions (and hopefully answers!) here.
Ever want to hide content inside a wiki article or HTML widget?
The Accordion Enhancement allows you to hide/show complete widgets on a page but sometimes you have:
- an HTML widget full of content.... and some of it should be hidden behind an accordion
- a Wiki article that should hide/show some extended content
- Maybe the same inside a Forum post
- Maye you want to give the ability to collapse content, but the content should show by default
There are HTML tags which allow you to do this: Read an article on the HTML tag: details
or you can make use of the accordion enhancement in places where it wasn't intended to be used.
Creating an accordion inside content
Sometimes you want to use an accordion inside of a wiki article or want a disclosure embedded in an HTML block editor. This is possible, but somewhat more complicated.
In the editor, switch to the Code View and insert the following code:
<div class="accordion"> <div class="ig-cpt-title">Read more on the overview</div> <div style="display: none;">This is just some body text.</div> </div>
Replace the Brown Text with your title and the Green Text will your content. If you want the content to be displayed OPEN by default, remove the Purple Text in the sample above.
Below is an example of the above text: