이 문서는 https://tiddlywiki.com/languages/ko-KR/에서 티들리위키의 정적 HTML 표현의 일부입니다

Introduction to Lists

2017년 12월 12일 오후 5:51

Making lists of items plays a central role in working with TiddlyWiki. The following is a brief run-through of some of the more common techniques.

TiddlyWiki uses lists internally for many purposes so the word can have several meanings. Here we are concerned with displaying sequences of items, but not necessarily presented as a conventional bullet list.

Manually Typed Lists

WikiText

WikiText lists are manually typed lists that use a special character to specify what sort of list it is and how it should be displayed.

Examples include bullet lists created with asterisks (*) and numbered lists (#). Behind the scenes, WikiText lists are based on the standard <ul> and <li> HTML elements. For more information see Lists in WikiText.

An example of a typed list in WikiText:

* Greatest Movies of All Time
** Casa Blanca
** Pride and Prejudice and Zombies

That renders as:

  • Greatest Movies of All Time
    • Casa Blanca
    • Pride and Prejudice and Zombies

Generated Lists

Lists can be automatically generated with the ListWidget using filters in which filter operators specify criteria for selecting which tiddlers are desired as output. Shortcut macros are provided for some common types of list.

ListWidget

The ListWidget is the most powerful tool for creating lists. It allows the filtered output to be manipulated and styled into forms that may not seem to resemble lists at all, for example tables or complex texts. For more details, see ListWidget.

An example to show all tiddlers tagged with "HelloThere" might look like:

<$list filter="[tag[HelloThere]]"><$view field="title"/><br/></$list>

That renders as:

A Gentle Guide to TiddlyWiki
Discover TiddlyWiki
Some of the things you can do with TiddlyWiki
Ten reasons to switch to TiddlyWiki
Examples
What happened to the original TiddlyWiki?
Funding TiddlyWiki
Open Collective

Tip
Even tiddlers themselves are made with the ListWidget. The ViewTemplate makes use of the ListWidget to fetch all specified templates that are used to show a tiddlers title, tags, text and more.

Filtered transclusion

The syntax for filtered transclusion {{{...}}} takes a filter as input and outputs a linked list of matching titles. You can also apply a template, for example:

{{{ [tag[HelloThere]] || $:/core/ui/TagTemplate }}}

That renders as:

list-links Macro

The list-links macro gives a preformatted list, typically a bullet list, in a more simplified way than by using the ListWidget. Behind the scenes it really is the ListWidget applying a default template to each list item.

Other “list related” features

list, list-before and list-after are all field names to control the position of tiddlers in a list. Fields are a way to add additional bits of structured information to a tiddler such as date, quantity, category, etc.

list and listed are filter operators to, respectively, select and find titles in lists.