Search the Community
Showing results for tags 'collapse'.
Found 1 result
Hi I am looking for an 'accordion' like approach that can be applied to individual sections of page content and work as a shortcode. A full accordion which does have a pagelines shortcode [pl_accordion] is not what I want as it collapses any other open sections and looks as though it does not like being used more than once on a page.. It is possible to code this directly calling bootstrap as follows: <a href="#" data-toggle="collapse" data-target="#demo3">click to reveal text 1</a> <div id="demo3" class="collapse out">text 1 to reveal contained here!</div> <br /> <a href="#" data-toggle="collapse" data-target="#demo4">click to reveal text 2</a> <div id="demo4" class="collapse out">text 2 reveal contained here!</div> The problem here is that each pairing (target / id) has to be set up by hand and as it's incremented and used HTML it is not sensible to give to end users to maintain. Much better would be a shortcode spproach which just sorted out correctly identifying the content area to expand or collapse and somehow handled incrementing id's in the background. Ideally in a form such as: [pl_collapse title="click to reveal text 1"] text 1 to reveal contained here! [/pl_collapse] I see there is a 'collapser' section in the store, but this looks to create custom post types, one per set of content, and offer much more by way of features and sophistication than I need. I am trying to keep all the content on one page!