On Friday, January 5, 2018 at 10:12:29 PM UTC-8, Mark S. wrote:
>
> \define mymacro2(web id) [ext[Linktext|$web$$id$]]
> \define mymacro() <$macrocall $name="mymacro2" web="
> https://mydomain.com/files/"; id={{!!webid}}/>
> <<mymacro>>
>

good answer...  I was preparing a similar response, with somewhat different 
syntax to stay as close as possible to the OP "spec by example".  Here's my 
solution:
\define mymacro()          <$vars webid={{!!webid}}<<mymacro_makelink>></$
vars>
\define mymacro_makelink() [ext[Linktext|https:
//verylongdomain.com/$(webid)$]]

The approach is basically the same as yours, except I avoided passing the 
$web$ parameter by using a fixed literal value directly in place.  I also 
avoided passing the id parameter by using the <$vars> widget to fetch the 
"{{!!webid}}" field value and set the $(webid)$ variable.  Lastly, as a 
matter of style, I prefer to use more description naming for "worker" 
macros rather than simply adding a number.  If there are a lot of worker 
macros involved, it would be hard to remember which numbered function does 
what!  Thus, "mymacro_link()" instead of "mymacro2()".

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki: The Missing Manuals

-- 
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/148010a9-f578-4497-921e-02befb252176%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to