Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-12-17 12:22:47

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Textile tables

I’m using the table rules as described/shown in the Textile help site, for example:

table(#id class).
|=. Table 1. Table caption (title) here.
|^(theader).
|_. Header |_. Header |_. Header |
|-.
|~(tfooter).
|\3. A footer spanning three columns. |
|-.
| data  | data | data |
| data |  data | data |
| data | data | data |
| data | data | data |

On the surface, in what should be the footer, which does not appear under the table, I see this, and the column alignment is off:

~(tfooter). A footer spanning three columns.

And the markup looks wacky (showing only the wacky parts here):

<table>
  <caption>Table 1. Table caption (title) here.</caption>
  <thead class="theader"> . . .</thead>
  <tbody>
   <tr>
    <td>~(tfooter).<br />
    </td>
    <td colspan="3">A footer, centered &amp; across two columns </td>
   </tr>
  </tbody>
  <tbody>
   . . .
  </tbody>
</table>

Note the double tbody and the odd markup in the first one that should be a tfoot.

Is the Textile help doc wrong? Or is this a bug needing reported?

Offline

#2 2020-12-17 12:59:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Textile tables

It works if you omit the |-. before the footer. The docs aren’t clear (heck, the txstyle.org site’s a mess!) but if you want to include both header and footer, you do it in one block – no need to ‘end’ the header’ and ‘start’ the footer, just indicate when you’ve finished defining one or both with the |-.. viz:

table(#id class).
|=. Table 1. Table caption (title) here.
|^(theader).
|_. Header1 |_. Header2 |_. Header3 |
|~(tfooter).
|\3. A footer spanning three columns. |
|-.
| data  | data | data |
| data |  data | data |
| data | data | data |
| data | data | data |

Last edited by Bloke (2020-12-17 13:00:48)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2020-12-17 15:46:06

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: Textile tables

Bloke wrote #327576:

heck, the txstyle.org site’s a mess!

Probably because Phil’s moved over the official docs to textile-lang.com :-)


TXP Builders – finely-crafted code, design and txp

Offline

#4 2020-12-17 16:13:19

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Textile tables

jakob wrote #327577:

Probably because Phil’s moved over the official docs to textile-lang.com :-)

Haha! Good catch. *slinks off and pretends I already knew that*

EDIT: In which case, we probably need to add an example there about what to do if both header and footer are used in tandem.

Last edited by Bloke (2020-12-17 16:14:24)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2020-12-17 17:00:21

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Textile tables

Open an issue on the textile website repo and I’ll deal with it in due course.

Offline

#6 2020-12-17 20:44:24

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Textile tables

Bloke wrote #327576:

if you want to include both header and footer, you do it in one block – no need to ‘end’ the header’ and ‘start’ the footer, just indicate when you’ve finished defining one or both with the |-..

Thank you.

@Phil, I followed the link in the forum footer, which apparently took me to txstyle.org and the old cheese.

Offline

#7 2020-12-18 08:24:38

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Textile tables

Destry wrote #327584:

@Phil, I followed the link in the forum footer, which apparently took me to txstyle.org and the old cheese.

Nix that. I didn’t know what I was talking about.

Offline

Board footer

Powered by FluxBB