List of fields in a different tiddler

69 views
Skip to first unread message

Stephen Kimmel

unread,
May 6, 2016, 1:21:43 PM5/6/16
to TiddlyWiki
What I want to do is produce a list of fields and values for a tiddler that isn't the current tiddler but whose name is contained in a temporary tiddler.

Given that this code produces a list of fields and values for the current tiddler

<dl>
<$list filter="[is[current]fields[]] -[[text]]" variable="fieldname">
<dt><$text text=<<fieldname>>/></dt>
<dd><$view field=<<fieldname>>/></dd>
</$list>
</dl>

can someone explain to me what it takes to produce a similar result?

None of the combinations I've tried with {$:/temp/old} have brought me any luck.




Mark S.

unread,
May 6, 2016, 2:48:17 PM5/6/16
to TiddlyWiki
Is this what you want?

<$set name=tid value={{$:/temp/old}}>
<dl>
<$list filter="[
<tid>fields[]] -[[text]]" variable="fieldname">
<dt><$text text=<<fieldname>>/></dt>
<dd><$view tiddler=<<tid>> field=<<fieldname>>/></dd>
</$list>
</dl>
</$set>

Stephen Kimmel

unread,
May 6, 2016, 3:13:45 PM5/6/16
to TiddlyWiki
Thanks. That certainly does it. I'm still trying to understand the use of a text reference in a filter... which is why I was pursuing the {$:/temp/old} approach. But in any case, this gets me past my difficulty. Thanks again.

Eric Shulman

unread,
May 6, 2016, 3:16:20 PM5/6/16
to TiddlyWiki
On Friday, May 6, 2016 at 10:21:43 AM UTC-7, Stephen Kimmel wrote:
What I want to do is produce a list of fields and values for a tiddler that isn't the current tiddler but whose name is contained in a temporary tiddler.

Given that this code produces a list of fields and values for the current tiddler

<dl>
<$list filter="[is[current]fields[]] -[[text]]" variable="fieldname">
<dt><$text text=<<fieldname>>/></dt>
<dd><$view field=<<fieldname>>/></dd>
</$list>
</dl>

can someone explain to me what it takes to produce a similar result?

Method #1:
* replace "is[current]" with "title{$:/temp/old}"
* add tiddler={{$:/temp/old}} to the $view widget

<dl>
<$list filter="[title{$:/temp/old}fields[]] -[[text]]" variable="fieldname">
<dt><$text text=<<fieldname>>/></dt>
<dd><$view tiddler={{$:/temp/old}} field=<<fieldname>>/></dd>
</$list>
</dl>

Method #2:
* set the currentTiddler context to the desired tiddler title by surrounding the code with <$tiddler tiddler={{$:/temp/old}}>

<$tiddler tiddler={{$:/temp/old}}>
<dl>
<$list filter="[is[current]fields[]] -[[text]]" variable="fieldname">
<dt><$text text=<<fieldname>>/></dt>
<dd><$view field=<<fieldname>>/></dd>
</$list>
</dl>

</$tiddler>

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
InsideTiddlyWiki: The Missing Manuals
Reply all
Reply to author
Forward
0 new messages