Your assumption about [[{{!!field}}]] is pretty common. Everyone would like
it if it worked that way.
What the parser does is look for anything between [[ and ]] and interpret
that text literally. When you try to put {{!!field}} between [[ and ]],
it's like when Wiley Coyote draws a door on the side of a canyon wall. Of
course he doesn't create a door -- just the image of a door. So when he
tries to go throw, he hits solid rock. Basically, whenever you use
structures like {{!!field}} it will be interpreted literally everywhere
except when called by a Widget.
Continuing the analogy, when the Roadrunner tries the drawn-on door, he
goes right through. This is undoubtedly because the Roadrunner is
leveraging the power of macros. Or widgets. My analogy is deteriorating a
bit. Oh well.
What you want is for the *value* of {{!!field}} to get pasted between [[
and ]]. This pasting is concatenation, and is done with macros.
If you put your text into a macro, like:
\define mylink(link) [[$link$]]
Then you might hope you could call it like:
<<mylink {{!!field}}>>
But this still doesn't work. You need to invoke it using some widget.
Typically this is the macrocall widget, the set (or vars) widget, or (like
you used) a use-case specific widget (e.g. <$link>).
You can invoke it with macrocall like:
<$macrocall $name=mylink link={{!!linkto}}/>
Or, taking a different approach, you can change the macro to:
\define mylink() [[$(link)$]]
and invoke it inside of a <$vars> widget which grabs the value of !!myfield
and turns it into a local variable (e.g $(link)$ in our example). Like:
<$vars link={{!!myfield}}>
<<mylink>>
</$vars>
If you really want the simpler syntax, you can do a 2 step process, like:
\define mylink2(link) [[$link$]]
\define mylink(link) <$macrocall $name=mylink2 link=$link$/>
<<mylink {{!!myfield}}>>
There's probably other ways to approach this, including the Wikify widget,
but this gives a general direction.
HTH
Mark
Beep! Beep!
On Saturday, September 16, 2017 at 11:35:59 AM UTC-7, Jim wrote:
>
> An example assumption I made.
>
> You use [[ ]] to create links. You use {{!!field}} to include a field.
> Therefore, [[{{!!field}}]] will create a link using the value of the
> field.
>
>
--
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/f824fbf3-c100-4373-8e4c-e4fbe14ed068%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.