title: Introduction to Lists
tags: Learning
text:
Lists play a central role in TiddlyWiki and there are several aspects of lists worth understanding. The following is a brief run-through of some of the more common techniques associated with lists.
Note that lists often don’t have the typical one-item-per-row appearance. This is especially true for //generated// lists (see below).
!Static lists
!!~WikiText
WikiText lists are explicitly typed lists where special characters are parsed to show special styling. Examples include bullet lists created with asterisks (*) and numbered lists (#). Behind the scenes, WikiText lists are based on the simple `<ul>` and `<li>` html-elements. For more, see [[Lists in WikiText]]
!Generated lists
Generated lists center around [[filters|Filters]] in which [[filter operators|Filter Operators]] define which are the concerned tiddlers and which parts of these tiddlers, such as their titles or their texts, that are desired for the output.
!!~ListWidget
This widget is the most powerful tool for creating lists. It allows the filter output to be manipulated and styled within the ListWidget - also into many forms that don't resemble lists at all, for example tables or complex texts.
''Side note'': Even tiddlers themselves are made with a ListWidget. The [[tiddler template|$:/core/ui/ViewTemplate]] lists the templates for each constituting field of the tiddler such as the title, the tags, the text and more.
!!Filtered transclusion
The short form for filtered transclusion (`{{{...}}}`) takes a filter as argument and outputs a line-broken but otherwise unstyled list, unless a template is applied to the output. For example `{{{ [tag[HelloThere]] || $:/core/ui/TagTemplate }}}` lists all tiddlers tagged HelloThere and presents them as tags.
!!list-links Macro
The [[list-links|list-links Macro]] macro was created to let you quickly and easily get a preformatted list, typically a bullet list. Behind the scenes it really is a ListWidget with some styling.
!Other “list related” commands
[[list|ListField]], [[list-before|Order of Tagged Tiddlers]] and [[list-after|Order of Tagged Tiddlers]] are all //field names// to control the position of tiddlers in a list.
[[list|list Operator]] and [[listed|listed Operator]] are //filter operators// that operate on the [[list field|ListField]]. ([[listed|listed Operator]] can also operator on other fields.)
Can I suggest full code examples that a user can copy and past into an empty.html to see it working,
I just came across Eric Shulman's impressive "Inside TiddlyWiki: The Missing Manual"!I know there has been a lot of discussions recently about the best new user experience and a bit of a refresh of tw.com centered on new users, and I thought this contributes much to the discussion!
On my browser, WikiText and ListWidget (headlines) have tildes (~) appearing in front of them. They don't show that when transferred to tiddlywiki.com. Odd.
Behind the scenes it really is a ListWidget with some styling.
Hi Mat,
I think without examples that show at least the output, it will be confusing to newbies.
Mat,Good work, Can I suggest full code examples that a user can copy and past into an empty.html to see it working, in addition I hope we may include examples that refer to the current tiddler using its title, tags or fields.Most people learn by doing.
\define list-links(filter,type:"ul",subtype:"li",class:"")
<$type$ class="$class$">
<$list filter="$filter$">
<$subtype$>
<$link to={{!!title}}>
<$transclude field="caption">
<$view field="title"/>
</$transclude>
</$link>
</$subtype$>
</$list>
</$type$>
\end
is there a example-tiddler to understand how it works in "real life"
"<<list-links filter:"[prefix[J]]">>" is everytime the same example.
Regards
Tob
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f73cf084-32d1-4490-b167-4e6517116f8a%40googlegroups.com.
So I provided a link to https://tiddlywiki.com/#list-links%20Macro%20(Examples) which shows how to use list-links.
`{{{ [tag[HelloThere]] || $:/core/ui/TagTemplate }}}`, which renders like: