Thank you very much for your help!

I guess I need to give up on this particular idea. There are only so many 
hours I can spend struggling with something like this before I am simply 
ready to ditch TiddlyWiki altogether. I really struggle with the syntax. 
Depending on the context, I may need one, two or three curly braces, or 
maybe '<' - or maybe '<<' - and I can't find any rhyme or reason for these 
contexts. The documents seem to be written for someone familiar with 
multiple programming languages. That's not me.

I just need a simple if/then/else and that seems to require a lot of 
strange workarounds. I guess I'll look for that elsewhere...

On Sunday, January 3, 2021 at 11:20:57 AM UTC-6 [email protected] wrote:

> Wrap the image part in a <$list> widget that tests whether isbn is blank. 
> You can use the emptyMessage attribute to show the plain URL instead when 
> there is no isbn.
>
> On Sunday, January 3, 2021 at 4:10:44 PM UTC+1 [email protected] wrote:
>
>> Yes, but I need a plain URL, not an image link, so wouldn't be able to 
>> use <$image ...
>>
>> On Sunday, January 3, 2021 at 9:08:08 AM UTC-6 [email protected] wrote:
>>
>>> The last example does that, it falls back to an entirely different URL 
>>> if no ISBN fields exist. 
>>>
>>> On Sunday, January 3, 2021 at 3:59:03 PM UTC+1 [email protected] wrote:
>>>
>>>> This looks nice! It appears to put all the right code in the right 
>>>> place. Now if only librarything servers would quit dying on me...
>>>>
>>>> Are there any other widgets with :filter and :else options that I could 
>>>> use to do something similar w/ a link? Specifically, use isbn or isbn13 in 
>>>> link, but if they don't exist show this *other* link? I've been using 
>>>> [ext[ 
>>>> link format, but need to do some if/then...
>>>>
>>>> On Sunday, January 3, 2021 at 8:38:38 AM UTC-6 [email protected] 
>>>> wrote:
>>>>
>>>>> Here is an example on falling back to the generic image if no ISBN 
>>>>> fields are defined
>>>>>
>>>>> \define makeimg()
>>>>> <$vars isbn={{{[{!!isbn}!is[blank]else{!!isbn13}]}}}>
>>>>> <$image source={{{ [[
>>>>> http://covers.librarything.com/devkey/dev-key-goes-here/medium/isbn/]addsuffix<isbn>]
>>>>>  
>>>>> :filter[<isbn>!is[blank]] :else[[generic image URL]] }}}/>
>>>>> </$vars>
>>>>> \end
>>>>>
>>>>> <<makeimg>>
>>>>>
>>>>

-- 
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/f824f9cf-834d-4364-92f5-659c91892291n%40googlegroups.com.

Reply via email to