You could pass a list in quotes, like: \define stuff(myvar mylist) I saw $myvar$. Then <br/> <$list filter="[enlist[$mylist$]]"> <$view field="title"/><br/> </$list> \end
-- Mark On Tuesday, November 20, 2018 at 8:36:39 PM UTC-8, Mohammad wrote: > > The TW macro can accept the optional parameter! An optional parameter is > the one you can send its value on macro call or you can ignore and macro > will use some default value! > My question is can we have a macro with variable number of parameters > (attributes) > > See below macro > > \define mypic(caption:"no caption", img) > <figure> > [img[$img$]] > <figcaption > style="text-align:center;font-weight:700;">$caption$</figcaption> > </figure> > \end > > I want to call mypic as below > > <<mypic caption img>> > > and > > <<mypic caption img1 img2 img3>> > > > > What do you think? > > > I know JS has this capability, see below > > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters > > > Mohammad > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/42343e78-fb15-47bd-b84f-9df17bf9f4ed%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

