formatting tables through a view template

79 views
Skip to first unread message

Robert Mastragostino

unread,
Apr 10, 2020, 9:32:41 PM4/10/20
to TiddlyWiki
I assume that this is a simple question, but I couldn't find an answer in the docs or searching through the forums.

I have a tiddler type representing an academic paper, tagged with "paper", with a few fields as below. I want the display of this tiddler to automatically produce a table displaying these fields. To do this I have another tiddler viewPaper, tagged as a viewTemplate, containing the following:

<$list filter="[is[current]tag[paper]]">
|!Author:   |{{!!author}}   |
|!Author2: |{{!!author2}} | 
|!Link:        |{{!!url}}         |
|!Notes:    |{{!!notes}}     |

</$list>

Unfortunately the formatting doesn't work, and the paper tiddler just appears as though this were written as one line of text (with field references correctly filled in). Copy-pasting the table itself into the desired tiddler displays exactly as expected, so I don't think this is a formatting problem. Is there some other syntax I need to force the display to work?

TonyM

unread,
Apr 10, 2020, 9:41:26 PM4/10/20
to TiddlyWiki
Quick tip;

See if it works after inserting a blank line after the list

<$list filter="[is[current]tag[paper]]">

|!Author:   |{{!!author}}   |
|!Author2: |{{!!author2}} |
|!Link:        |{{!!url}}         |
|!Notes:    |{{!!notes}}     |

</$list>
Then remove the unwanted blank at the end of the line marked in red.

Regards
Tony

TonyM

unread,
Apr 10, 2020, 9:44:22 PM4/10/20
to TiddlyWiki
The Red marker was not showing - try again


On Saturday, April 11, 2020 at 11:41:26 AM UTC+10, TonyM wrote:
Quick tip;

See if it works after inserting a blank line after the list

<$list filter="[is[current]tag[paper]]">

|!Author:   |{{!!author}}   |
|!Author2: |{{!!author2}} |x

|!Link:        |{{!!url}}         |
|!Notes:    |{{!!notes}}     |

</$list>

Lin Onetwo

unread,
Apr 10, 2020, 11:11:32 PM4/10/20
to TiddlyWiki
Maybe you can try DynamicTable   using

<<RowTable "
[tag[paper]]" "Author Author2 Link Notes">>


在 2020年4月11日星期六 UTC+8上午9:32:41,Robert Mastragostino写道:

Mohammad

unread,
Apr 11, 2020, 2:49:32 AM4/11/20
to TiddlyWiki
Shiraz dynamic table is one simple and quick solution!
See it here: https://kookma.github.io/TW-Shiraz/


Or the more powerful: TiddlyTables

--Mohammad

Robert Mastragostino

unread,
Apr 11, 2020, 1:53:06 PM4/11/20
to TiddlyWiki
Well that's embarrassing. Thanks, that worked like a charm.
Reply all
Reply to author
Forward
0 new messages