This is a collapse commander element with no added metadata. Only Title and Content:
This is an example with NO trigger text assigned:
This is an example with sub items…
A Pluginoven Test Site
This is a collapse commander element with no added metadata. Only Title and Content:
This is an example with NO trigger text assigned:
This is an example with sub items…
Here is a test with and expand and subexpand elements with html formatting in the Title Attribute:
[expand title="I am <b>bold</b>"]...[/expand]
However, this is not supported across all WordPress versions. Collapse-O-Matic version 1.3.6 offers some new placeholders to use as a work-around for WordPress installations that will not allow html in the title, swaptitle, startwrap, endwrap, excerpt and swapexcerpt attributes:
%(% = <
%)% = >
%{% = [
%}% = ]
[expand title="I am %(%b%)%bold%(%/b%)%"]...[/expand]
One benefit of using Collapse Commander is that all attributes are not processed through the shortcode attribute filters. This means that both HTML and Shortcodes are fully supported, without the need to further clutter the expand shortcode attributes with placeholders.
This is a standard collapse element with an plain text excerpt:
[expand title="trigger text" excerpt="excerpt text"]target content[/expand]
I am a <em>little</em> tea-pot
Now, what if we wanted to have the excerpt contain a shortcode…
well, no, The shortcode parser does not accept square brackets within attributes. But, what if we used placeholders?!
As of Collapse-O-Matic v1.6.3d placeholders have been added as a work-around that allows both HTML and shortcodes to be used within the title, swaptitle, startwrap, endwrap, excerpt and swapexcerpt attributes:
%(% = <
%)% = >
%{% = [
%}% = ]
So the simple syntax would look like this:
[expand title="trigger text" excerpt="%{%some_shortcode attribute='value'%}%"]target content[/expand]
Keep in mind that if double quotes are used to wrap the attribute, then single quotes must be used inside the nested shortcode’s attributes. Or, as the example below shows, single quotes used to wrap the attribute value, and double quotes inside the nested shortcode’s attributes.
So, a real world example would look like this:
[expand title='I am a little donkey' excerpt='%{%caption id="attachment_1493" align="alignnone" width="150"%}%<a href="https://spacedonkey.de/wp-content/uploads/2014/11/donkey5n-3.jpg"><img src="https://spacedonkey.de/wp-content/uploads/2014/11/donkey5n-3-150x150.jpg" alt="short and stout" width="150" height="150" class="size-thumbnail wp-image-1493" /></a> short and stout%{%/caption%}%']stuck in a manhole until someone pulled me out.[/expand]
On some versions of WordPress the use of HTML in shortcode attributes is limited or not at all supported. In these cases you can use placeholders as a work-around, like so:
[expand title="Trigger Text %(%strong%)%Bold%(%/strong%)%"]Hidden Content[/expand]
Yes it’s a bit messy but it does work. Let’s see if Collapse Commander can help clean up this clutter.
And finally here is a test using the Collapse Commander add-on plugin:
[expand cid="1537"/]
Oh, very cool! As an added bonus, there is no need to use placeholders. Collapse Commander accepts the full shortcodes in the excerpt fields, as shown in the following screenshot. Check it out:
This is the test page for a new plugin Isotope-O-Matic. The plugin will drop in the Isotope library to create fancy-schmancy gallery thing-a-ma-jigs
Here are some images in a div:
In the swiss canton of Basel this donkey was stuck in a asshole manhole. The brave firefighters saved him, so a happy ending for all. Full story and pictures available at nydailynews.
Here is an example of how to add ‘extra’ sub li’s to a list element using the jedi powers of collapse-o-matic:
The basic idea is this:
<ul>
<li>your thing with a link
<ul>
<li>this is the super cool extra info</li>
</ul>
</li>
<li>some other thing</li>
</ul>
So now we just need to add the roll-your-own collapse-o-matic elements:
<ul>
<li>your thing with a <span class="collapseomatic" id="linkone">link</span><ul><li id="target-linkone" class="collapseomatic_content">this is the super cool extra info</li></ul></li>
<li>some other thing</li>
</ul>
and BLAMO!