Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
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 & 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
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
Online
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
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
Online
Re: Textile tables
Open an issue on the textile website repo and I’ll deal with it in due course.
Offline
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
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
Pages: 1