Okay, so a related question...
That worked great when I was inside the *one tiddler* that had that field.
But what about being in a tiddler that is looping with the ListWidget over
the tiddlers that all have tracking_number fields ?
The variable item is being set for the loop, as the iterator. So I tried
this and it didn't work...
<a href={{{[[
https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=]addsuffix{
<item>!!tracking_number}]}}
<https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=]addsuffix%7B!!tracking_number%7D]%7D%7D>}>USPS
Tracking</a>
Thank you!
On Monday, June 29, 2020 at 9:15:52 AM UTC-4, Mark S. wrote:
>
> What you're trying to do is to concatenate the contents of a field with a
> string. There are a couple different approaches, often using helper macros.
> These days, I like to use the {{{ }}} wikitext and a filter that uses
> "addprefix" or "addsuffix". Like:
>
> <a href={{{[[
> https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=]addsuffix{!!tracking_number}]}}}>USPS
>
> Tracking</a>
>
>
> On Monday, June 29, 2020 at 5:50:39 AM UTC-7, David wrote:
>>
>> I have this code that tries to put a field value into a link, which seems
>> logical, but doesn't work...
>>
>> <a href="
>> https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1={{!!tracking_number}}
>> ">USPS Tracking</a>
>>
>> I also tried the transclude code...
>>
>> <a
>> href="https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=<$transclude
>>
>> field="tracking_number" />">USPS Tracking</a>
>>
>> I had originally tried this code, but it seems that external links have
>> to be put into the html anchor tag.
>>
>> [[USPS Tracking|https://
>> tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=<$transclude
>> tiddler=<<item>> field="tracking_number" />]]
>>
>> Thank you all!
>>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/f2ccdf3b-ea7e-4dfb-bdbf-040e19e355b5o%40googlegroups.com.