Expandcontract_XH 0.4
by svasti
Tested with CMSimple_XH 1.6.1*
This plugin creates links, which on click expand the content of the linked page. Another click will contract this content again. Without Javascript the links act a standard links.
New in 0.4
- New order of parameters. 1st parameter for linking a single page.
- 2nd parameter is link text
- Height of expanded area can be limited and given a vertical scroll bar.
The pages linked via Expandcontract are either
all the hidden subpages of the page where the plugin is called (default setting), e.g.:
{{{expand();}}}
The plugin creates a <p>-paragraph for every created link.- the page given as 1st parameter
{{{expand('page name','link text');}}}
In linking a single page the plugin will not create a new paragraph. Thus the plugincall can be entered into normal text.Please note: The content of the linked page is hidden in a <div> after the plugin call. In a <p> paragraph divs are not allowed and the browser will generate a new paragraph after the div plus a small html error, because or the remaining </p>. All this is prevented by formatting the paragraph as <div> and not as <p>.
Plugin config
Set in plugin config
- whether the expanded content should show its heading or not,
- whether at the bottom of the expanded content a "Close" button should be put or not.
- whether the height of the expanded area is limited and gets a vertical scroll bar.
In the plugin call config settings can be overwritten. There are 5 optional parameters:
{{{expand('page name' or '','link text' or '',O=without headings 1=with headings or ''=config settings,O=without Close-button
1=with Close-button or ''=config settings, 'max height of expanded area' or no entry for no height limit);}}}
Examples
{{{expand('Terms and Conditions','click here for our Terms and Conditions', 1, 1, '300px');}}}
The words click here for our Terms and Conditions are shown as link. A click will expand the content of the page
Terms and Conditions
with heading, "close" button and limited height of 399 px (regardless of config settings in the plugin backend).
{{{expand('Workshop Timetable','click here for more details');}}}
The words click here for more details are shown as link. A click will expand the content of the page
Workshop Timetable
with heading, "close" button and height limit as set in the plugin backend.
Installation
Unzip, copy the plugin in your plugin folder and enter the plugin call as shown above on a page.
*)
In other CMSimple(_XH)-Versions the call is {{{PLUGIN:expand();}}}