How can I create columns without adding all that table markup code?
This handy little script lets you select where the split in the text should be. This recipe then puts the two bits of text into a two-column table.
Put make_columns.php in your cookbook/directory, and rename 'make_columns.php'.
Add the following line to local/config.php
This recipe provides very simple markup to allow a page to contain a section sub-divided into two columns of equal width, and optionally allows full-width text above and below the two-column section. Note the restriction here is that there can only be one section per page that is broken into columns. The recipe provides exact control so the editor can decide where to put the split
(:colstart:) -- This markup tag allows the editor to indicate where the column block of text begins. All text before this tag will appear above the two-column block.
(:colend:) -- This markup tag allows the editor to indicate where the columns should end. Any text after this tag will appear after the two-column block.
(:column:) -- this markup tag tells the recipe where to split the two columns. As this recipe does not attempt to calculate where an equidistant split should be, it is up to the editor to decide where. Everything before this tag (not including any text before the (: colstart:) tag) will be put into the first column. Everything after this tag (not including any text after the (:colend:) tag) will be put into the second column.
2005-09-22 : Make Columns - version 0.1 - BenWilson
- Initially written
2005-10-04 : Make Columns - version 0.2
- It appears Andreas added the
(:colend:)tag to the markup.
2005-10-04 : Make Columns - version 0.3
2005-11-20 : Make Columns - version 1.0 - BenWilson
- added stripslashes fix.
- added class to the table for CSS markup.
- This recipe was last tested on PmWiki version: 2.1.Beta-1
- Columns - To easily split lists into multiple columns
See discussion at MakeColumns-Talk