Columns macro

The Columns macro makes it easier to use parallel columns in a wiki.

<<Columns(start, leftcolumn)>>

Download & Release Notes

Download

Release Version

Moin Version

Release Notes

Columns-1.9.x.py

1.9

based on 1.8.4 macro

Columns-1.6.py

1.6

<<Columns(start,left)>> , <<Columns(end)>> Macro converted to new syntax of 1.6

Columns.py

1.2

Requirements

The Columns macro requires the proper class definitions into the CSS. For example, using two columns named leftcolumn and rightcolumn the CSS should contain these lines:

#leftcolumn {
        position: relative;
        background: transparent;
        float: left;
        width: 45%;
        border-right: 1px solid gray;
        padding-left: 5%;
        padding-right: 1%;
        margin: 0px;
}

#rightcolumn {
        position: relative;
        background: transparent;
        float: right;
        width: 42%;
        padding-right: 1%;
        margin: 0px;
}

<<Columns(next, rightcolumn)>>

Usage

Using the Columns macro has three steps.

  1. Starting the columns
    • <<Columns(start, columnname)>>

  2. Breaking for the next column
    • <<Columns(next, column2name)>>

    • you can repeat the <<Columns(next, columnname)>> as long as you have unique names for each column, and your CSS supports these. (I'm not 100% sure about the uniqueness requirement, it might be possible to make a CSS with one column name that can be used for all columns)

  3. Ending the Columnized area
    • <<Columns(end)>>

Technical details

The macro creates <div> -elements, and ending </div> -elements with columnname as the id-attribute. See the source code for details.

<<Columns(end)>>

Download: Columns.py

AnttiKuntsi -- 2004-06-14

AnttiKuntsi, BoleslawKulbabinski

License

As far as the author is concerned, this code is released to the public domain, but some restrictions in the MoinMoin COPYING file may apply. Ask a lawyer.


Discussion

Thank you!

I did some small changes to Columns-1.9.x.py based on the 1.8.4 version -- ReimarBauer 2011-03-07 09:04:16

MoinMoin: MacroMarket/Columns (last edited 2011-09-30 16:51:57 by cpe-70-123-133-115)