PmWiki.TableDirectives History

Hide minor edits - Show changes to markup

April 16, 2017, at 05:28 PM EST by Hayle - 5LRJrjTkWiz
Changed line 1 from:

No qusieton this is the place to get this info, thanks y'all. http://aomeltwmi.com [url=http://gtxphn.com]gtxphn[/url] [link=http://kbuqxzgb.com]kbuqxzgb[/link]

to:

I will be putting this <a href="http://mrgvld.com">daizzlng</a> insight to good use in no time.

April 14, 2017, at 07:32 PM EST by Gwenelda - s4S7zHRlhP
Changed line 1 from:

Ppl like you get all the <a href="http://bfcczjco.com">brinsa.</a> I just get to say thanks for he answer.

to:

No qusieton this is the place to get this info, thanks y'all. http://aomeltwmi.com [url=http://gtxphn.com]gtxphn[/url] [link=http://kbuqxzgb.com]kbuqxzgb[/link]

April 14, 2017, at 02:50 AM EST by Latricia - mn3t22tmueP
Changed line 1 from:

Shoot, so that's that one sueospps. http://whmpen.com [url=http://kmdygvyipcm.com]kmdygvyipcm[/url] [link=http://whvwsuy.com]whvwsuy[/link]

to:

Ppl like you get all the <a href="http://bfcczjco.com">brinsa.</a> I just get to say thanks for he answer.

March 30, 2017, at 03:42 AM EST by Prudence - GWMZ3lCf3c
Changed line 1 from:

I've been <a href="http://myocqpxkjaf.com">loinokg</a> for a post like this for an age

to:

Shoot, so that's that one sueospps. http://whmpen.com [url=http://kmdygvyipcm.com]kmdygvyipcm[/url] [link=http://whvwsuy.com]whvwsuy[/link]

March 29, 2017, at 10:30 PM EST by Issy - gIoYkfYCsKI3
Changed line 1 from:

It's always a pleasure to hear from someone with expietrse. http://tqowweuwzu.com [url=http://bkrczvccdby.com]bkrczvccdby[/url] [link=http://qyfhon.com]qyfhon[/link]

to:

I've been <a href="http://myocqpxkjaf.com">loinokg</a> for a post like this for an age

March 29, 2017, at 03:12 PM EST by Kristanna - Q0QynuEN8stL
Changed line 1 from:

Play <a href="http://pwgbty.com">infoimatrve</a> for me, Mr. internet writer.

to:

It's always a pleasure to hear from someone with expietrse. http://tqowweuwzu.com [url=http://bkrczvccdby.com]bkrczvccdby[/url] [link=http://qyfhon.com]qyfhon[/link]

March 21, 2017, at 03:20 PM EST by Jane - XiZcNrIp
Changed line 1 from:

The new design seems to have come out of a focus group session with gixxer squids. Hell for Leather please find out who was responsible for the 2011 Speed Triple Cahoatrspte. Is this why Tue Mantoni quit Triumph?

to:

Play <a href="http://pwgbty.com">infoimatrve</a> for me, Mr. internet writer.

March 19, 2017, at 10:33 PM EST by Tassilyn - PthsNFF8G
Changed line 1 from:

Please teach the rest of these internet hoalngois how to write and research!

to:

The new design seems to have come out of a focus group session with gixxer squids. Hell for Leather please find out who was responsible for the 2011 Speed Triple Cahoatrspte. Is this why Tue Mantoni quit Triumph?

September 13, 2015, at 01:55 AM EST by Pragya - umeZ3BLbQ
Changed lines 1-144 from:

authors (intermediate)

(:title Table Directives:) There are four directives for table processing. All must be at the beginning of a line to have any effect.

(:table (attr...):)

Generates a new HTML <table> tag with the attributes provided in attr.... Closes the previous table, if any. Valid attributes and values are:

  • border (a positive integer)
  • bordercolor (a color name or hex number; doesn't display in all browsers)
  • cellspacing (a positive integer indicating the space between cells)
  • cellpadding (a positive integer indicating the interior border of a cell)
  • width (a positive integer or percent)
  • bgcolor (a color name or hex number)
  • align (left, center or right)
  • summary (does not display; used primarily to help visually disabled people navigate)

(:cell (attr...):)

Generates a new cell with the attributes given by attr.... Closes the previous table cell, if any. In HTML, this creates a new "<td attr>" tag (and possibly <table>, <tr>, and </td> tags if they are needed to produce a valid HTML table).

Note: Placing a space after the cell markup "(:cell:) " causes subsequent text on that line to be treated as preformatted text.

Valid attributes and values are:

  • align (left, center or right)
  • valign (top, middle or bottom)
  • colspan (a positive integer)
  • rowspan (a positive integer)
  • bgcolor (a color name or hex number)
  • width (a positive integer or percent)

(:cellnr (attr..):)

Generates a new cell at the beginning of the next row. Closes the previous table cell, if any. In HTML, this creates a "<tr><td attr>" tag, and possibly <table>, </td>, and </tr> tags if they are needed for valid HTML. Valid attributes and values are:

  • align (left, center or right)
  • valign (top, middle or bottom)
  • colspan (a positive integer)
  • rowspan (a positive integer)
  • bgcolor (a color name or hex number)
  • width (a positive integer or percent)

(:tableend:)

Closes the previous table cell and closes off any table. Generates </td>, </tr>, and </table> tags as needed.

Notes

For the table, cell, and cellnr tags the author can specify any attributes that would be valid in the HTML <table> or <td> tags. Thus you can specify rowspan, colspan, etc. arguments to build arbitrary tables. However, it's not possible to nest a (:table:) inside of a (:cell:) or (:cellnr:) -- the next paragraph explains why.

Many are likely to ask why we didn't just use the standard HTML table markup (<table>, <tr>, <td>, <th>) instead of creating a new markup, and allowing nested tables as a result. There are two answers: first, the HTML table markup is very ugly for naive authors (see PmWiki.Audiences and PmWikiPhilosophy #2), and second, it'd be very easy for authors to create tables that are incorrect HTML and that display incorrectly (or not at all) on some browsers. Even seasoned web professionals sometimes get the table markup wrong, so it's a bit unrealistic to expect the average author to always get it right, or to be able to read arbitrary HTML table markup that someone else has created.

Common comment: Surely, the average or naive author would not be writing HTML directly, but using a tool, such as FrontPage, or even MSWord, to generate the HTML. This would be a lot simpler than learning even the simplest PmWiki markups.
Pm's Response: And once the HTML has been generated and posted, how is someone else going to edit or modify the table if they don't have the original FrontPage or MSWord file used to create it? Remember that we're talking about collaborative authoring. The HTML that those packages generate is among the hardest to read and edit of all!

It's difficult to write the code needed to make PmWiki understand and fix arbitrary table markup, so PmWiki uses the simplified version above. Still, this version is able to handle most table requirements (with the possible exception of nested tables).

And, this is not to say that nested HTML tables are impossible in PmWiki --they just can't be easily created by wiki authors using the default wiki markup. A site administrator can of course create header/footer HTML code and other local customizations that make use of nested tables.

Example 1. A table using table directive markup.

(:markup:) (:table border=1 cellpadding=5 cellspacing=0:) (:cell:) a1 (:cell:) b1 (:cell:) c1 (:cell:) d1 (:cellnr:) a2 (:cell:) b2 (:cell:) c2 (:cell:) d2 (:tableend:)

In HTML, this is the same as

<table border='1' cellpadding='5' cellspacing='0'>
  <tr>
    <td>a1</td>
    <td>b1</td>
    <td>c1</td>
    <td>d1</td>
  </tr>
  <tr>
    <td>a2</td>
    <td>b2</td>
    <td>c2</td>
    <td>d2</td>
  </tr>
</table>

Floating Table with bulleted navigation list

(:table border=1 width=30% align=right bgcolor=#cccccc cellspacing=0 :) (:cellnr:) Navigation Links (:cellnr:)

(:tableend:)

What if you wanted to create a nice little table like a table of contents in a page like this? In this example, the table is floating right and contains some links in a bulleted list. This is a nice demonstration of how it's possible to build a little table of contents in the page, which might navigate to other pages just within the same wiki group. Note that having a bulleted list won't work in a ordinary table - it only works inside an table created with table directives such as the example code used here.

(:markup:) (:table border=1 width=30% align=right bgcolor=#cccc99 cellspacing=0 :) (:cellnr:) Navigation Links (:cellnr:)

(:tableend:) (:markupend:)

(:markup:) (:table border=1 width=30% align=right bgcolor=#cccc99 cellspacing=0 :) (:cellnr colspan=2 align=center:) Navigation Links (:cellnr align=center:) Tables (:cell align=center:) Table directives (:tableend:) (:markupend:)

Looking at the markup here, notice that we have used a #cccc99 hex color for the table background. also the (:cellnr:) markup creates a new row, a new cell and closes the row at the end.

You could take this concept a little further: since you might want each page in the group to contain the same table of contents, you can make ONE table like the above and put it in its own page. Then use an include on any of your pages and bring in the table. The float (align) property will be honored in each page where it's included. Pretty sweet!

<< | Documentation Index | >>

Can I define table headers using the table directive markup?

No, but you can with Cookbook:AdvancedTableDirectives. See Pm's reply to pending PITS:00535

to:

Please teach the rest of these internet hoalngois how to write and research!

Copyright © 2007, Jonathan L.S. Byrnes
Web site by Lexington Digital
Page last modified on April 16, 2017, at 05:28 PM EST