transclusion and tables

83 views
Skip to first unread message

arg...@gmail.com

unread,
Apr 20, 2018, 10:58:56 AM4/20/18
to TiddlyWiki
Hello,

I want to build a table from transcluded widgets each containing a part of the table.

there is the syntax i use : {{{[tag[arme]]||template-equipement}}}

and there is what i get :

| arme a une main | arme | 1d8 | | 5 | | | arme batarde | arme lourdes | 1d10 | batarde, précis | 50 thalers | a deux mains | | Arme courte | arme courte | 1d6 | court | 1 thaler | | | arme longue | arme longue | 1d8 | long | 3 thalers | | | armes lourdes | armes lourdes | 1d10 | | 10 thalers | | | attaque sans arme | attaque sans arme | 1d4 | court | 0 | | | bâton articulé | arme longue | 1d8 | long, immobilisant | 15 thalers | | | bâton de combat | arme longue | 1d6 | long, contondant | 1 shilling | | | Bec de Corbin |

Could you help me ?

Mark S.

unread,
Apr 20, 2018, 11:13:29 AM4/20/18
to TiddlyWiki
It might help to see the contents of template-equipement


-- Mark

arg...@gmail.com

unread,
Apr 20, 2018, 3:23:44 PM4/20/18
to TiddlyWiki
Here is the content :
| {{!!nom}} | {{!!type-equipement}} | {{!!degats}} | {{!!qualites}} | {{!!cout}} | {{!!note}} |

Mark S.

unread,
Apr 20, 2018, 3:43:05 PM4/20/18
to TiddlyWiki
Well, I hope someone can give you a better answer than this, but whenever I've needed to build a table this way I've ended up using HTML structures in the template. So
you would invoke like:

<table>
{{{[tag[arme]]||template-equipement}}}
</table>

and your template-equipement would look like:

<tr><td> {{!!nom}} </td><td> {{!!type-equipement}} </td><td> {{!!degats}} </td><td> {{!!qualites}} </td><td> {{!!cout}} </td><td> {{!!note}} </td></tr>

Good luck!
-- Mark

arg...@gmail.com

unread,
Apr 21, 2018, 8:33:32 AM4/21/18
to TiddlyWiki
It works fine, thanks a lot !!
Reply all
Reply to author
Forward
0 new messages