Newbie question: I want to view mode of a tiddler to display the fields

81 views
Skip to first unread message

Susannah Medley

unread,
Mar 17, 2020, 12:51:35 PM3/17/20
to TiddlyWiki
Right now, I have to edit a tiddler to see what fields have been set. I want those fields to appear in the view mode as well as the edit mode. I think this involves editing a shadow Tiddler, but I'm not sure how. Can anyone post a simple solution for this?

Mohammad

unread,
Mar 17, 2020, 1:02:15 PM3/17/20
to TiddlyWiki
Hi Susannah,

One simple way is to show the tiddler fields in view mode by demands. To do so, I may propose TW-Utility plugin

Look at the star on the Page controls next to save button.

To give a try create a new tiddler with some fields and save
Then click on show fields (click the button)

--Mohammad

Mark S.

unread,
Mar 17, 2020, 1:18:20 PM3/17/20
to TiddlyWiki
Be sure to back up your file.

Make a tiddler and tag it $:/tags/ViewTemplate with the following contents:

<$list filter="[all[current]fields[]] -modified -created -text -title -tags -type -list" variable=field>
''<
<field>>'': <$edit-text field=<<field>> tag="input" size=20/><br/>
</$list>

This should present your "personal" fields for editing in all tiddlers.

Mohammad

unread,
Mar 17, 2020, 1:28:05 PM3/17/20
to tiddl...@googlegroups.com
The other solution may be to add a little wikitext script like below

  1. create a new tiddler, name it whatever you like
  2. tag it with $:/tags/ViewTemplate
  3. put the below into the text field
<details open><summary>Display fields</summary>
<$list filter="[all[current]fields[]] -title -text -tags -modified -created -creator -modifier" variable=item>
''<$text text=<<item>>/>'': <$transclude field=<<item>>/><br>
</$list>
</details>

Save and see its effect on other tiddlers.
The details is a standard html5 tag and creates an slider, you can change open to close to set the initial status as closed.

Hope this helps. I am sure more elegant solution will be given by others here.

--Mohammad


Susannah Medley

unread,
Mar 17, 2020, 1:57:33 PM3/17/20
to TiddlyWiki
Thank you! This is doing just what I wanted: displaying the fields and even allowing me to change them without editing the whole tiddler. This is very convenient. Thank you.

Susannah Medley

unread,
Mar 17, 2020, 1:58:27 PM3/17/20
to TiddlyWiki
Thank you! This works, too. Shows all the fields and I like the expand/collapse feature. Looks very elegant. 


On Tuesday, March 17, 2020 at 10:28:05 AM UTC-7, Mohammad wrote:
The other solution may be to add a little wikitext script like below

  1. create a new tiddler, name it whatever you like
  2. tag it with $:/tags/ViewTemplate
  3. put the below into the text field
<details open><summary>Display fields</summary>
<$list filter="[all[current]fields[]] -title -text -tags -modified -created -creator -modifier" variable=item>
''<$text text=<<item>>/>'': <$transclude field=<<item>>/><br>
</$list>
</details>

Save and see its effect on other tiddlers.
The details is a standard html5 tag and create an slider, you can change open to close to set the initial status as closed.

Julio Peña

unread,
Mar 17, 2020, 1:58:46 PM3/17/20
to TiddlyWiki
Hello there,

Although not addressed to me...VERY handy code snippets.
Thanks Mohammad and Mark S. for sharing these.


Many blessings,
Julio

Susannah Medley

unread,
Mar 17, 2020, 2:01:51 PM3/17/20
to TiddlyWiki
A huge thank you to Mark and Mohammad. It would have taken me forever to get this working on my own. This helped me a lot.
Reply all
Reply to author
Forward
0 new messages