Thank you Eric, that is great, it produces the right results !
I'm seeing some other enhancements I can add (for example turn the field 
name into a tiddler so the list generated would be something like: [[field 
name]] = field value ).
Is there a place I can go to read and learn this how to manipulate this? I 
will start on TW5 and the $list widget.
Thanks again,

A 

On Thursday, May 13, 2021 at 10:46:36 PM UTC-4 Eric Shulman wrote:

> On Thursday, May 13, 2021 at 7:24:09 PM UTC-7 [email protected] wrote:
>
>> I am trying to understand how to use and manipulate the user fields 
>> section.
>> In a tiddler edit mode, at the bottom below "content type", there is a 
>> "add a new field" section.
>> If I add a new field, call it "catalase", and I assign a field value of 
>> "xyz", how do I display the value of the field in the body of the tiddler?
>>
>
> You can use the $view widget, like this: <$view field="catalase" />  
> Alternatively, you can use *transclusion* syntax, like this: 
> {{!!catalase}}.  The difference is that the $view widget will display the 
> field value as plain text, while the transclusion syntax will parse the 
> field value as wikitext, so it can contain other formatting syntax within 
> the value of the field,.
>  
>
>> If I create more than one user field, can I display a list of all 
>> field:value pairs in the body of the tiddler ? I am just having difficulty 
>> understanding how to manipulate this.
>>
>
> To automatically generate a list of all fields in a tiddler, you can use 
> the $list widget with the fields[] filter operator, like this:
>
> <$list filter="[<currentTiddler>fields[]] -[[title]] -[[text]] -[[tags]] 
> -[[created]] -[[modified]]" variable="fieldname">
>    <<fieldname>> = <$view field=<<fieldname>> /><br>
> </$list>
>
> Notes:
> * The fields[] operator returns ALL fields of the current tiddler, 
> including the standard fields that exist in every tiddler (title, text, 
> tags, created, modified).  The example filter above removes those specific 
> field names so that only your "user" fields are output.
> * The example uses the variable="somename" parameter to hold the matching 
> field name so that the <<currentTiddler>> value remains unchanged inside 
> the $list widget.  This is needed so that the $view widget will reference 
> the current tiddler in which the $list widget occurs.
>
> enjoy,
> -e
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/93505a74-918b-4cdc-96da-bf5b1cd7d8bfn%40googlegroups.com.

Reply via email to