wiki:FoldMacro

Version 5 (modified by anonymous, 6 years ago) (diff)

--

Macro for creating foldable tables

Under construction.

Description

A macro for creating foldable tree-like tables in trac.

Bugs/Feature Requests

Existing bugs and feature requests for FoldMacro are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out FoldMacro from here using Subversion, or browse the source with Trac.

Example

A macro to create a foldable tree-like table.

One creates a foldable table by creating a normal trac-like table inside a processor block:

{{{
#!fold
|| Normal || Trac || Table || Syntax ||
|| Normal || Trac || Table || Syntax ||
}}}

To make parts of the table foldable, insert diff like statements into it:

{{{
#!fold
|| Normal row ||
<<<
|| This part is shown ||
---
|| If the above row is expanded, it will be replaced by this row ||
>>>
|| Normal row ||
}}}

Foldable blocks can be nested in other foldable blocks to create tree-like tables. To keep the table readable we recommend to use indentation, which is legal in foldable tables.

The following is an example table:

{{{
#!fold
|| Grandparent A ||
  <<<
  || Grandparent B ||
  ---
  || '''Parent B.1''' ||
    <<<
    || Parent B.2 ||
    ---
    || Child B.2.1 ||
    || [http://www.google.com Child B.2.2] ||
    || Child B.2.3 ||
    >>>
  || Parent B.3 ||
  >>>
|| Grandparent C ||
}}}

Recent Changes

[3755] by p__m on 2008-05-30 17:34:38
Initial import of fold macro.
[3754] by p__m on 2008-05-30 16:00:07
New hack FoldMacro, created by p__m

Author/Contributors

Author: p__m, Shivoc
Contributors: