list-links-draggable macro defect (blank caption)

46 views
Skip to first unread message

c pa

unread,
May 27, 2021, 4:22:35 PM5/27/21
to TiddlyWiki

I notice that the updated list-links-draggable macro shows a blank entry in the case where the tiddler referred to has a caption field but the field is empty.

title: test
text: <$macrocall $name=list-links-draggable tiddler=<<currentTiddler>> field="flow-list">>
flow-list: this that the other

title: that
caption:

Displays:
============
* this
*                                   <-- entry for that is blank
* the
* other

c pa

unread,
May 27, 2021, 4:43:00 PM5/27/21
to TiddlyWiki
Ahhhhh... I see that this is the transclude docs:

The TranscludeWidget treats any contained content as a fallback if the target of the transclusion is not defined (ie a missing tiddler or a missing field).

I had been under the impression that $transclude was an empty fallback rather than a missing fallback. So I need to change a bunch of stuff to use $set with emptyValue rather than $transclude for the content

Mohammad Rahmani

unread,
May 28, 2021, 12:36:22 AM5/28/21
to tiddl...@googlegroups.com
This is a bug! and I think it has been already raised!

In $:/core/macros/list
In list-links-draggable macro

Change
<$link to={{!!title}}>
<$transclude field="caption" >
<$view field="title"/>
</$transclude>
</$link>


to
<$link to={{!!title}}>
<$transclude field={{{ [<currentTiddler>has[caption]then[caption]else[title]] }}} >
<$view field="title"/>
</$transclude>
</$link>



Best wishes
Mohammad


--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/94259f06-7d66-40ed-a9fe-439e16ad341bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages