MultiColumn

Summary: Allow text to flow into multiple columns
Version: 2010-12-16B
Prerequisites: javascript must be turned on in the client's browser
Status: alpha
Maintainer: Peter Bowers
Users: (View? / Edit?)
Categories: Uncategorized
Discussion: MultiColumn-Talk?

Questions answered by this recipe

  • I want the text on my page to flow in newspaper-like columns without me having to break it up. How can I do that?

Description

Allow text to flow into multiple columns.

Installation

  1. Download multicolumn.zipΔ
  2. Place cookbook/multicolumn.php in your cookbook directory and pub/multicolumn/multicolumn.js in your pub directory in the appropriately named sub-directory.
  3. Include the following line in your local/config.php
include_once("$FarmD/cookbook/multicolumn.php");

Notes

Before the text that you want columnized, put (:startcolumn [OPTIONS]:) and after the text put (:endcolumn:).

Valid [OPTIONS] include the following:

  • columns=n
    • unset: calculate number of columns based on minimum width. n>0: use specified number of columns, always adapt width.
  • minheight=n
    • Minimum height of a column
  • minsplitheight=n
    • If the base column is smaller than minSplitHeight, the column does not split.
  • extraheight=n
    • Add extra height to a column. Increase this if the last column 'sticks out' too much.
  • readontext="text"
    • Add the "read on" notice at the bottom of each column

For example:

(:startcolumn columns=3 readontext="Continue >>":)
this section of text will flow into 3 columns -- well, at least it would if there were 
enough text to make it go into 3 columns.  The problem is I'm too lazy to type any more text.
(:endcolumn:)

Release notes

  • 2010-12-16B Installation flub-up fixed.
  • 2010-12-16 Initial release.

See also

  • Columns   Create columns out of lists without using table markup
  • CreateColumns   quickly divides up a list of items into separate columns within a table
  • MakeColumns   Create columns on a page without using tables.
  • MakeManyColumns   How to make columns on a page using CSS
  • MultiColumn   Allow text to flow into multiple columns

Contributors

  • This recipe uses a script by Randy Simons. broken link

Comments

See discussion at MultiColumn-Talk?

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.