2013-10-31 22:03:40 +00:00
|
|
|
title: ViewWidget
|
|
|
|
created: 201310241419
|
2014-02-22 08:53:58 +00:00
|
|
|
modified: 201402220837
|
2014-09-10 23:06:19 +00:00
|
|
|
tags: Widgets
|
|
|
|
caption: view
|
2013-10-31 22:03:40 +00:00
|
|
|
|
|
|
|
! Introduction
|
|
|
|
|
|
|
|
The view widget displays the contents of a tiddler field in a specified format.
|
|
|
|
|
|
|
|
! Content and Attributes
|
|
|
|
|
2013-11-09 17:30:06 +00:00
|
|
|
The content of the `<$view>` widget is displayed if the field or property is missing or empty.
|
2013-10-31 22:03:40 +00:00
|
|
|
|
|
|
|
|!Attribute |!Description |
|
2014-10-10 20:06:48 +00:00
|
|
|
|tiddler |The title of the tiddler (defaults to the CurrentTiddler) |
|
2013-10-31 22:03:40 +00:00
|
|
|
|field |The name of the field to view (defaults to "text") |
|
2014-02-22 08:53:58 +00:00
|
|
|
|index |The name of the index to view |
|
2013-10-31 22:03:40 +00:00
|
|
|
|format |The format for displaying the field (see below) |
|
|
|
|
|template |The optional template used with certain formats |
|
|
|
|
|
|
|
|
!! Formats
|
|
|
|
|
|
|
|
The following formats can be specified in the `format` attribute:
|
|
|
|
|
|
|
|
|!Format |!Description |
|
|
|
|
|''text'' |Plain text |
|
|
|
|
|''htmlwikified'' |The field is wikified and the resulting HTML returned as plain text |
|
|
|
|
|''htmlencoded'' |The field is displayed with HTML encoding issues |
|
|
|
|
|''date'' |The field is interpreted as a UTC date and displayed according to the DateFormat specified in the `template` attribute |
|
|
|
|
|''relativedate'' |The field is interpreted as a UTC date and displayed as the interval from the present instant |
|
|
|
|
|''stripcomments'' |The field is interpreted as JavaScript source code and any lines beginning `\\#` are stripped |
|
|
|
|
|''jsencoded'' |The field is displayed as a JavaScript encoded string |
|