I have a relatively simple macro to write a table based on a number of tiddlers. I would like to break it down into a macro that writes the shell (<table>
and <thead>
as well as their end tags) and calls another macro that writes the <tbody>
in the middle, so that I can reuse the latter macro in other contexts. But I’m flustered once again by a syntax problem: How do I pass the outer parameter to the inner one:
\define board-members(board)
<table>
<thead> <!-- ... --> </thead>
<!-- ******************************************************************** -->
<$transclude $variable="board-members-body" board=????? />
<!-- ***** What goes here? -------------^ ***** -->
<!-- ******************************************************************** -->
</table>
\end
I’ve tried various syntaxes (<<board>>
, <__board__>
, {{{ <<board>> }}}
, {{{ <__board__> }}}
, and others, with and without quotes), but it’s just guessing, and not coming up with something that works. If I hard code the value as a string, the output is right for that given value, but it ignores the outer parameter, of course.
Is there a simple solution that will work here?
This is some heavy modification of an existing wiki, written in 5.2.3
. If this would be better written with functions/procedures from 5.3.0
, let me know, and I will try to update. Either way, I would still like to know if I’m missing some simple way to do this, or am dealing with a more substantial misunderstanding of macros. (It’s happened before!)