MediaWiki Extension CollapsableText

CollapsableText is an extension of MediaWiki to create automatically portions of text which are collapsable.


  1. Download CrossReference,
  2. Unpack the archive in your Mediawiki directory
  3. add
    in your LocalSettings.php.
  4. You should skip this step if your mediawiki installation directory is the same as your Apache document directory. Icons used by this extensions should be accessible from the web client navigator. Icons are inside the directory extensions/CollapsableText/public. You must make this directory accessible from a browser with the URL /extensions/CollapsableText/:
    1. on Unix operating systems (including MacOS X):
      $> ln -s /path/to/mediawiki/extensions/CollapsableText/public
    2. on other operating systems (including Windows®): copy the content of /path/to/mediawiki/extensions/CollapsableText/public into /path/to/apache/document/root/wiki/extensions/CollapsableText


General Usage

CollapsableText extension provides only one HTML tag: <collapsetext>. This tag permits to mark some part of the wikitext as collapsable:
<collapsetext>This is the Title (always visible). This is the collapsed text (visible when not collapse).</collapsetext>

The text inside <collapsetext/> is parsed to detect a part which must be always visible and a part will should be invisible. The rules to detect both parts are (in prefered order):

  1. The first occurrence of the tag <collapse> is the limit between the two parts.
    Example: <collapsetext>ABC. DEF.<collapse>GHI.</collapsetext>,
    ABC. DEF.
  2. The first part is enclosed by braces.
    Example: <collapsetext>ABC. DEF. GHI.</collapsetext>,
    ABC. DEF.
  3. The first part is the first sentence (first occurrence of the point).
    Example: <collapsetext>ABC. DEF. GHI.</collapsetext>,

Tag Parameters

Tag <collapsetext/> accepts parameters: