I think I figured it out using the set widget.

<$set name=redoneplanet filter="[prefix[{!!planet}]]" value="<$link
to={{!!planet}}>{{!!planet}}</$link>" emptyValue={{!!planet}}>
<<redoneplanet>>
</$set>

This way, when the planet field does not have square brackets, a link is
created to the tiddler of the same name.  If it does have brackets (and as
a tiddler title doesn't exist), then it is simply transcluded as-is.

On Wed, Jan 6, 2016 at 10:27 AM, David Allen <[email protected]>
wrote:

> Your suggestion is having the same problem as the solution I came up with,
> unless I'm not understanding what you're doing.
>
> Here's what I've got:
>
> <$setvars _aplanet={{!!planet}} theplanet="aplanet[1]">
> <link to=<<theplanet>>><<theplanet>></$link>
> </$setvars>
>
>
>
> On Mon, Jan 4, 2016 at 12:27 AM, Tobias Beer <[email protected]> wrote:
>
>> Hi David,
>>
>>
>>> I just need a way to override the link widget's formatting now.
>>> Otherwise Eric Shulman's solution works beautifully.
>>>
>>
>> Unfortunately, that is not true. Although you may feel like you can avoid
>> retrieving the title using a variable, you do need a proper reference and 
>> *[[Some
>> Title]]* is not while *Some Title* is.
>>
>> The one thing I could think is to not use any link widget at all but to
>> transclude the planet field as is, since it already does contain the link
>> notation, e.g. *[[Some Title]]*... so simply inserting that via
>> *{{!!planet}}* should produce a link, e.g.:
>>
>> title: any title
>> planet: [[Some Planet]]
>>
>> {{!!planet}} <= this will be a link!
>>
>> However, using an editor equivalent to the tags editor, any values that
>> do *not* contain spaces will be saved without double square brackets,
>> so...
>>
>> title: any other title
>> planet: Earth
>>
>> {{!!planet}} <= this will NOT be a link!
>>
>> So, as I or Eric suggested, you do need to retrieve the given item from a
>> list-field and store it in a variable ...to be able to properly construct
>> the link using the link widget.
>>
>> Ergo: It is not simply a matter of styles / formatting.
>>
>> Best wishes,
>>
>> Tobias.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "TiddlyWiki" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/tiddlywiki/YpM4Jw8nkdU/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/0f3612fd-9210-4b26-b931-73de3c358caa%40googlegroups.com
>> <https://groups.google.com/d/msgid/tiddlywiki/0f3612fd-9210-4b26-b931-73de3c358caa%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> David Allen
>



-- 
David Allen

-- 
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/CALaYjLjMmTuVpi7s5BFVTuecO_TZOW13t1BBgjEnExri4qROcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to