Consensus Definition
1. A “virtual-tiddler” node (virtual node) is not a real tiddler.
- There is no object with this title in the TiddlyWiki file, and no content assigned directly to that title.
- The node will not be saved (to disk or to server).
- The title of a virtual node will not appear in search results or be listed in indexes.
- A link to this node will display in italics (by default).
2. A virtual-tiddler node can be opened and displayed in the Story River (via a link or button), like a standard tiddler, and it can invoke templates.
- Whatever is displayed at a virtual node is dynamically displayed in the story river “on demand” based on template(s).
- Once open, a virtual-tiddler node appears in the “Open” sidebar list, and can be navigated to, closed, or otherwise interacted with according to its toolbar buttons and other interface options.
- By default, these nodes look similar to other tiddlers, but they can be configured to have a distinctive appearance, to show different toolbar buttons, etc.
3. A virtual-tiddler node fits the `is[missing]` filter condition, but can offer dynamic content.
- By default, it displays the “Missing Tiddler Hint” (until/unless configured otherwise).
- By default, like all tiddlers, it includes the “edit” button on its toolbar, so it is possible to create a tiddler at that node by entering edit mode and saving any changes made.
Further Explanation
A virtual node has no data of its own (since it is not itself a tiddler), but it can offer a useful window on data that exists elsewhere in the wiki (or potentially from other connected data sources). A virtual node typically treats the node’s title as a starting-point for relational connections.
Virtual-node solutions range from intuitive to complex.
Two essential ingredients for ANY virtual-tiddler node
- A way to open that node in the story river — typically by choosing the tag name at the top of a tag pill, or making fieldnames or field values display as links. (As with standard tiddlers, nodes can also be opened via a button or other action that modifies the story river.)
- A view template that automatically displays content based on the name of the node — that name may simply be the already-meaningful name of a tag, field, or field-value. (Even without using virtual-tiddler nodes, you may already be using such a view template for tags, showing a list or a table of all tiddlers so tagged, or all the tiddlers with the field name in question, plus the values in those fields.) View templates can include ones that apply to all tiddlers in the story river (via
$:/tags/ViewTemplate
), but they may also include elements that apply via special cascade conditions.
Intuitive virtual nodes:
A virtual-tiddler node is “intuitive” if its name is already a meaningful word or string in the context of its home TiddlyWiki, and opening a link to it serves — intuitively — to deliver information or perspective associated with the node’s name.
-
Missing tiddler node: Technically, the “null” case of a virtual-node tiddler is the missing-tiddler message. Of course, the term “virtual-tiddler node” (or “virtual node” for short) suggests something more informative. Notice, however, that a missing-tiddler node itself might be rendered much more informative if/when a template automatically shows backlinks, or other suggested connections.
-
Tagname node: An intuitive virtual node is illustrated at tw-com for tag-pills where there is no actual tiddler there, as in the JSON Operators home-node (chosen by selecting the top item in the tag pill for JSON Operators).
-
Fieldname node: A simple tweak to the edit-fields interface makes every fieldname into a clickable link. A fieldname node can offer an overview of tiddlers that have that field, along with the value of the field for each such tiddler.
-
Fieldvalue node: Wherever fields display their values as links, those links may open a node that offers relational connections based on that field value. For example, the name of an author at this bibliographic wiki offers links to all the works by that author, even though the author name is not a tiddler.
-
Filter-expression node: Filter-expressions should never be tiddlers (because their titles contain square brackets and other characters that disrupt TiddlyWiki processing). However, a virtual-tiddler template can render for filter-expression nodes, allowing the output of a frequently-used or complex filter to occupy space in the story river. (Tweaking the toolbar to conditionally hide the edit button is wise, to reduce risk of writing these tiddler names into the TiddlyWiki storage!) Although this is a more complex kind of virtual node, the “natural” value of the node name, as a recognizable filter expression, makes it another kind of intuitive virtual node.
The above models of “intuitive virtual tiddlers” are carefully documented here at quick-demo.
There are also various more complex possibilities that can be developed. In all of them, the two main questions still are (1) “How does that node get opened in the story river?” (2) “What templates/cascades determine how that node (and links to it) will display?”
In addition we can add (3) Are certain standard interface elements hidden, or stylistically modified, for some or all virtual nodes? (4) Are there startup actions or aspects of the page (other than the story river) that are designed to display or facilitate virtual nodes?
Among the virtual nodes that go beyond intuitive node-names, we can include @Scott_Sauyet’s bingo-card solution. Although countless bingo card arrangements are possible in this wiki (practically countless), there are no actual bingo-card tiddlers! Instead, a link (or randomizer) opens a node for a number (any number!), and that number (as the name of a node in the story river) determines how the bingo-card template is filled in. For example, see Card_8675309. (More information on this process can be found on the About page.)
The rest of this wiki turns to one carefully-developed specific implementation of virtual-tiddlers nodes that begin with a special prefix. Such nodes will be opened with special buttons, and display more complex content, based on a template applied through cascade conditions.
Quick Guide (to Kookma-style virtual tiddlers)
This is a quick guide to creating virtual tiddlers in TiddlyWiki using a custom solution called ‘‘simple’’.
Overview
The ‘‘simple’’ solution allows you to create virtual tiddlers dynamically. These are not real tiddlers stored in the wiki, but rather temporary views generated on demand.
Key Features
- A virtual-tiddler node is added to the story river using a button, or a link that points to its name.
- View templates and cascade conditions determine how a virtual-tiddler node displays, based on its title.
- Virtual-tiddler nodes can offer powerful template overviews for a tag (even if there’s no tiddler at the home node for the tag) or for fieldname (even if there’s no tiddler corresponding to the field name).
- Virtual-tiddler nodes can gather a dashboard of information and controls a user needs for a task (such as printing), even if that information is located in multiple temporary and permanent tiddlers.
Aspects of a Virtual-Tiddler Solution
Opening virtual-tiddler nodes
- Generates a button or link that, when clicked, opens the virtual tiddler in the story river
Cascade View Title Template Filter
- Controls how the title of the virtual tiddler is displayed
- Uses the filter defined in: [[simple/ViewTemplateTitleFilters]]
- The actual title template used by the filter is located in: [[simple/Template/TitleTiddler]]
Cascade View Body Template Filter
- Controls how the body content of the virtual tiddler is displayed
- Uses a cascade condition defined via [[simple/ViewTemplateBodyFilters]]
- The body template used by the filter is given in: [[simple/Template/BodyTiddler]]
Custom Stylesheet
- Applies styling specifically to the simple virtual tiddler
- Hides all buttons except the ‘‘Close’’ button for a clean and relevant interface
Here is a Simple Virtual Tiddler bundle, which creates virtual tiddlers and display them in story river. To give a give a try, download and drag and drop into https://tiddlywiki.com and open the simple/demo
- Package to download: kookma-simple-virtual-tiddler-package.json (3.7 KB)