[Mediawiki-l] Collapsible article sections extension?

Rob Church robchur at gmail.com
Fri Aug 31 14:53:12 UTC 2007

On 31/08/2007, Azurite <azurite at seventh-star.net> wrote:
> Hi,
> I'm looking for some extension (or something) that allows me to have
> parts of a page, or perhaps templates embedded in a page always display
> as collapsed, and allow the user to maximize/show/expand them when they
> want. For example, a template would be included and have a title, and
> text to the title might be something like [+] or [show] or [expand] or
> similar. Is there something that does this? (I'm thinking it would be
> Javascript, but I'm not sure.)

There's probably at least one or two implementations of this for each
major language edition Wikipedia; it's usually accomplished with a
<div>, some styles, and a bit of JavaScript, which is not particularly
hard to do.

Have a look at http://en.wikipedia.org/wiki/Template:Collapse, which
is a bit of a workaround - the block is assigned a class which I
assume some site JavaScript checks for, and modifies accordingly.

Turning this into a proper <extension></extension> should be extremely

Rob Church

More information about the MediaWiki-l mailing list