Answer

This recipe defines a (:columns # Page:) directive, which acts a lot like an (:include:) directive. This directive formats the included text so that the items in the source list will be placed into a table, with the number of columns that you specify. Placement of the (originally vertical) list items proceeds left to right and top to bottom, as illustrated in the following mock-up:

Source, located at SourcePageName

item1item2item3item4item5item6item7

Output Example 1, using (:columns 2 SourcePageName:)

item1 item2item3 item4item5 item6item7

Output Example 2, using (:columns 3 SourcePageName:)

item1 item2 item3item4 item5 item6item7

Syntax: (:columns # SourcePageName:)

The number of columns per row must be specified before the SourcePageName.

This recipe will put columns into a table for you, rather than a <div> arrangement, and is useful for long lists which simply need to be put into a table with multiple columns to save vertical space. This allows authors to focus on creating the list without giving thought to how to split up the list into columns. The number of columns is easy to change at any time without having to edit the source list.

Notes and Comments

The output uses bare <TABLE>, <TR>, and <TD> tags. It could really use some better CSS integration, but I don't know how.

Of course, templating this recipe just leads to the idea of a generic data templating system. If there were such a system, this recipe would only need to be used to groups things into generic row/fields which could then be formatted by the data templating system.