As a starter, there's an error in your macro. It should be "$i$", not "$i".

Good luck!

-- Mark

On Wednesday, February 21, 2018 at 7:17:50 PM UTC-8, Iain wrote:
>
> I'm trying to construct a tabulated listing of tiddlers using the 
> following template. In the <tr> element, "order" is an attribute, and it's 
> value XXX is the tiddler's position in the title list (not shown in 
> example).
>
> <$list filter="filter goes here">
>   <tr order="XXX">
>     <!-- row contents here -->
>   </tr>
> </$list>
>
> As I've discovered, tiddlywiki macros don't do simple text substituion at 
> all, so doing something obvious like
>
> \define makerow(i) <tr order="$i">
>
> <$list filter="filter goes here">
>   <$macrocall $name="makerow" i=<<XXX>> />
>     <!-- row contents here -->
>   </tr>
> </$list>
>
> doesn't work because the substition works fine, but the macro output then 
> seems to be rendered into the DOM tree as  a <tr order="1"></tr>, but NOT 
> wrapped around my row contents (and the </tr> in the source is now an 
> orphaned end element).
>
> Can anyone instruct me on how I can produce <tr> elements so they get the 
> correct attribute value and wrap my row contents - the row contents in the 
> sample is quite complicated, so I suspect it'll break tiddlywiki if the 
> answer is to move the lot up into the macro.
>
> Cheers, Iain
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d75c8b2f-b3db-486f-a483-c9350d48fea7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to