mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
list-links macro: add "field" parameter
See https://talk.tiddlywiki.org/t/choosing-what-field-to-show-with-list-links/5039?u=jeremyruston
This commit is contained in:
parent
3be9b13814
commit
965bd090a9
@ -1,21 +1,21 @@
|
|||||||
title: $:/core/macros/list
|
title: $:/core/macros/list
|
||||||
tags: $:/tags/Macro
|
tags: $:/tags/Macro
|
||||||
|
|
||||||
\define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage)
|
\define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage,field:"caption")
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$type$ class="$class$">
|
<$genesis $type=<<__type__>> class=<<__class__>>>
|
||||||
<$list filter="$filter$" emptyMessage=<<__emptyMessage__>>>
|
<$list filter="$filter$" emptyMessage=<<__emptyMessage__>>>
|
||||||
<$subtype$>
|
<$genesis $type=<<__subtype__>>>
|
||||||
<$link to={{!!title}}>
|
<$link to={{!!title}}>
|
||||||
<$let tv-wikilinks="no">
|
<$let tv-wikilinks="no">
|
||||||
<$transclude field="caption">
|
<$transclude field=<<__field__>>>
|
||||||
<$view field="title"/>
|
<$view field="title"/>
|
||||||
</$transclude>
|
</$transclude>
|
||||||
</$let>
|
</$let>
|
||||||
</$link>
|
</$link>
|
||||||
</$subtype$>
|
</$genesis>
|
||||||
</$list>
|
</$list>
|
||||||
</$type$>
|
</$genesis>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define list-links-draggable-drop-actions()
|
\define list-links-draggable-drop-actions()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
caption: list-links
|
caption: list-links
|
||||||
created: 20140917083515996
|
created: 20140917083515996
|
||||||
modified: 20190206000000000
|
modified: 20221105090835041
|
||||||
tags: Macros [[Core Macros]]
|
tags: Macros [[Core Macros]]
|
||||||
title: list-links Macro
|
title: list-links Macro
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@ -15,6 +15,8 @@ Note: Each first [[step|Filter Step]] of a [[filter run|Filter Run]] not given a
|
|||||||
|
|
||||||
;filter
|
;filter
|
||||||
: A [[filter|Filters]] selecting which tiddlers to include
|
: A [[filter|Filters]] selecting which tiddlers to include
|
||||||
|
;caption
|
||||||
|
: The name of the field to transclude for each list item, defaultingt to `caption`
|
||||||
;type
|
;type
|
||||||
: An HTML element to use for the overall list element, defaulting to `ul`
|
: An HTML element to use for the overall list element, defaulting to `ul`
|
||||||
;subtype
|
;subtype
|
||||||
|
Loading…
Reference in New Issue
Block a user