This was not only helpful but also very instructive. Thank you Eric, very 
much appreciated! Great writeup!

<:-)


On Thursday, May 21, 2015 at 4:52:51 PM UTC+2, Eric Shulman wrote:
>
> On Thursday, May 21, 2015 at 5:22:25 AM UTC-7, Mat wrote:
>>
>> \define geturl()
>> <$transclude tiddler=<<tidname>> field="url"/>
>> \end
>>
>> \define gettext()
>> <$transclude tiddler=<<tidname>> field="text"/>
>> \end
>>
>>
>> \define bookmarkstable()
>> <table>
>> <$list filter="[tag[Foo]]" variable="tidname">
>>    <tr>
>>       <td><$link to=<<geturl>>>URL</$link></td>
>>       <td><$link to=<<tidname>>><<tidname>></$link></td>
>>       <td><<gettext>></td>
>>    </tr>
>> </$list>
>> </table>
>> \end
>>
>
> There are a few issues here:
> 1) The very first line of http://tiddlywiki.com/#LinkWidget says:
>
>> The link widget generates links to tiddlers. (Use the HTML <a> element to 
>> generate external links). 
>
> Thus, you should not be using the <$link> widget to create an external 
> link.
>
> 2) There's no need to use variable="tidname" in the <$list> widget, as it 
> just complicates things.  The default for the <$list> widget is to set 
> "currentTiddler", which has the advantage of also being used as the current 
> "context" for simple {{...}} transclusion, without using the <$transclude> 
> widget.
>
> 3) The reason the <<gettext>> macro works but <<geturl>> doesn't is 
> because the <<gettext>> result is being rendered as content, which wikifies 
> the <$transclude> widget that was returned.  In contrast, you are trying to 
> use the result of <<geturl>> as a *param* for the <$link> widget, which 
> does not get wikified and thus remains literally "<$transclude .../>"
>
> Thus, to get things to work as you want:
> 1) eliminate the macros (not needed)
> 2) eliminate the use of variable="tidname"
> 3) use simple transclusion of fields to insert their values
>
> The following works as you want, without needing extra macros
>
> \define bookmarkstable()
> <table>
> <$list filter="[tag[Foo]]">
>    <tr>
>       <td><a href={{!!url}}>URL</a></td>
>       <td><$link>{{!!title}}</$link></td>
>       <td>{{!!text}}</td>
>    </tr>
> </$list>
> </table>
> \end
> Note: you don't need *any* params for the <$link> widget, since it's 
> default is to use the current tiddler as the target.
>
> enjoy,
> -e
> Eric Shulman
> ELS Design Studios
> TiddlyTools - "Small Tools for Big Ideas!"
> InsideTiddlyWiki: The Missing Manuals
>
> YOUR DONATIONS ARE VERY IMPORTANT!
> HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
>    http://TiddlyTools.github.com/fundraising.html#MakeADonation
>
> Professional TiddlyWiki Consulting Services...
> Analysis, Design, and Custom Solutions:
>    http://www.TiddlyTools.com/#Contact
>

-- 
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 http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/50ea42cf-2bf3-4912-97c0-f572f9a176ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to