How to <$list> a "field" that contains "TextReference"?

57 views
Skip to first unread message

Mohamed Amin

unread,
May 7, 2021, 11:53:46 PM5/7/21
to TiddlyWiki
I just discovered another AMAZING feature in TW5, which is the capability of the "fields" to contain a TextReference (like {{!!someField}} ).

For example, in my "Books" Tiddlers (which has "book_title", "book_edition" and "book_date" fields), I can add a "caption" field, with a value like =  {{!!book_title}} / {{!!book_edition}} - {{!!book_date}}

So If I used : {{!!caption}} inside my tiddler I'll get something like:
Mybook01 / 1st Edition - 2014
which is amazing, and work as "enclosive template".

Now, My Question is, 
How can I use this feature inside <$list> widget?ie. How can I wikify the "TextRefernce" field value inside a list? 

Note:
If I used : <$list filter="[tag[Books]get[caption]]"/>
The result is = "{{!!book_title}} / {{!!book_edition}} - {{!!book_date}}"

But I need the following:
Mybook01 / 1st Edition - 2020
Mybook02 / 3rd Edition - 2014
Mybook03 / 2nd Edition - 2017
.
.

Thanks

Mohammad Rahmani

unread,
May 8, 2021, 5:19:58 AM5/8/21
to tiddl...@googlegroups.com
On Sat, May 8, 2021 at 8:23 AM Mohamed Amin <msam...@gmail.com> wrote:
I just discovered another AMAZING feature in TW5, which is the capability of the "fields" to contain a TextReference (like {{!!someField}} ).

For example, in my "Books" Tiddlers (which has "book_title", "book_edition" and "book_date" fields), I can add a "caption" field, with a value like =  {{!!book_title}} / {{!!book_edition}} - {{!!book_date}}

So If I used : {{!!caption}} inside my tiddler I'll get something like:
Mybook01 / 1st Edition - 2014
which is amazing, and work as "enclosive template".

Now, My Question is, 
How can I use this feature inside <$list> widget?ie. How can I wikify the "TextRefernce" field value inside a list? 

Note:
If I used : <$list filter="[tag[Books]get[caption]]"/>
The result is = "{{!!book_title}} / {{!!book_edition}} - {{!!book_date}}"

  1. The filter is wrong for what you want
  2. The result is correct, as you ask for caption not transcluded value
  3. So do as below to get what you want

    <$list filter="[tag[Books]">
             <$transclude field=caption/>
       </$list>
 

But I need the following:
Mybook01 / 1st Edition - 2020
Mybook02 / 3rd Edition - 2014
Mybook03 / 2nd Edition - 2017
.
.

Thanks

--
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/ba53fab5-30ee-496e-a8f7-2f2e71bc7c12n%40googlegroups.com.

Mohammad Rahmani

unread,
May 8, 2021, 5:21:59 AM5/8/21
to tiddl...@googlegroups.com
There was a missing parentheses in my previous code

<$list filter="[tag[Books]]">
      <$transclude field=caption/>
</$list>



Best wishes
Mohammad

Mohamed Amin

unread,
May 8, 2021, 9:09:20 AM5/8/21
to TiddlyWiki
Thanks a lot Mohamed for you answer
Reply all
Reply to author
Forward
0 new messages