mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-25 07:24:40 +00:00
* Revert the list-tagged-draggable to use title field by default * Update list.tid It seems `<$transclude field=<<__field__>> />` when field default value is empty does not work as expected. This commit uses `field:"title"` instead of `field:""` in the list-tagged-draggable header. * Update list.tid The redundant `field` removed. The new `displayField` attribute is used to let user choose the filed they like to display when the list items are rendered as simple links. * Update list.tid The proposed field attribute in list-tagged-draggable updated to use the same `displayField` aslist-links-draggable. * Create #9177 change note for #9177 was created * Update list.tid The `list-links-draggable` now is fully backward compatible. It uses caption as default field as before and is compatible with `list-links`. The `list-tagged-draggable` is fully backward compatible while got a new displayField parameter. * Update list-tagged-draggable Macro.tid Update docs to reflect new displayField parameter * Update list-links-draggable Macro.tid Update documentation to reflect the new displayField parameter. * Update list-tagged-draggable Macro.tid Update docs. Remove formatting error in doc.
41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
caption: list-links-draggable
|
|
created: 20170328204925306
|
|
modified: 20211214141650488
|
|
tags: Macros [[Core Macros]]
|
|
title: list-links-draggable Macro
|
|
type: text/vnd.tiddlywiki
|
|
|
|
The <<.def list-links-draggable>> [[macro|Macros]] renders the ListField of a tiddler as a list of links that can be reordered via [[drag and drop|Drag and Drop]].
|
|
|
|
!! Parameters
|
|
|
|
; tiddler
|
|
: The title of the tiddler containing the list
|
|
: <<.from-version 5.4.0>> If the tiddler parameter is not defined it defaults to: <<.var currentTiddler>>
|
|
|
|
; field
|
|
: The name of the field containing the list (defaults to `list`)
|
|
|
|
; emptyMessage
|
|
: Optional wikitext to display if there is no output (tiddler is not existed, field is not existed or empty)
|
|
|
|
; type
|
|
: The element tag to use for the list wrapper (defaults to `ul`)
|
|
|
|
; subtype
|
|
: The element tag to use for the list items (defaults to `li`)
|
|
|
|
; class
|
|
: Optional space separated classes to add to the wrapper element
|
|
|
|
; itemTemplate
|
|
: Optional title of a tiddler to use as the template for rendering list items
|
|
|
|
;displayField
|
|
: Optional name of the field to display when the list is rendered. Defaults to the "caption" field; if "caption" is not present, the "title" field is used instead
|
|
|
|
|
|
If the `itemTemplate` parameter is not provided then the list items are rendered as simple links. Within the `itemTemplate`, the [[currentTiddler Variable]] refers to the current list item.
|
|
|
|
<<.macro-examples "list-links-draggable">>
|