diff --git a/core/wiki/macros/list.tid b/core/wiki/macros/list.tid index 1ee8cad2e..da507a114 100644 --- a/core/wiki/macros/list.tid +++ b/core/wiki/macros/list.tid @@ -1,9 +1,9 @@ title: $:/core/macros/list tags: $:/tags/Macro -\define list-links(filter,type:"ul",subtype:"li",class:"") +\define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage) <$type$ class="$class$"> -<$list filter="$filter$"> +<$list filter="$filter$" emptyMessage=<<__emptyMessage__>>> <$subtype$> <$link to={{!!title}}> <$transclude field="caption"> @@ -69,9 +69,9 @@ tags: $:/tags/Macro \end -\define list-tagged-draggable(tag,itemTemplate,elementTag:"div") +\define list-tagged-draggable(tag,emptyMessage,itemTemplate,elementTag:"div") <$set name="tag" value="""$tag$"""> -<$list filter="[tagging[]]"> +<$list filter="[tagging[]]" emptyMessage=<<__emptyMessage__>>> <$elementTag$ class="tc-menu-list-item"> <$droppable actions=<>> <$elementTag$ class="tc-droppable-placeholder"> diff --git a/editions/tw5.com/tiddlers/macros/ListMacro.tid b/editions/tw5.com/tiddlers/macros/ListMacro.tid index 20383c1a5..5ab99f8f3 100644 --- a/editions/tw5.com/tiddlers/macros/ListMacro.tid +++ b/editions/tw5.com/tiddlers/macros/ListMacro.tid @@ -1,8 +1,9 @@ -created: 20140917083515996 -modified: 20150221223214000 -title: list-links Macro -tags: Macros [[Core Macros]] caption: list-links +created: 20140917083515996 +modified: 20180109171310659 +tags: Macros [[Core Macros]] +title: list-links Macro +type: text/vnd.tiddlywiki The <<.def list-links>> [[macro|Macros]] returns a formatted list of links to a [[selection of tiddlers|Title Selection]]. @@ -18,5 +19,7 @@ If a tiddler has a <<.field caption>> field, this is shown instead of the tiddle : An HTML element to use for each item in the list, defaulting to `li` ;class : A [[CSS|Cascading Style Sheets]] class for the overall list element +;emptyMessage +: Optional wikitext to display if there are no tiddlers with the specified tag <<.macro-examples "list-links">> diff --git a/editions/tw5.com/tiddlers/macros/list-tagged-draggable Macro.tid b/editions/tw5.com/tiddlers/macros/list-tagged-draggable Macro.tid index 367be9980..d62805a6c 100644 --- a/editions/tw5.com/tiddlers/macros/list-tagged-draggable Macro.tid +++ b/editions/tw5.com/tiddlers/macros/list-tagged-draggable Macro.tid @@ -1,6 +1,6 @@ caption: list-tagged-draggable created: 20170329092723939 -modified: 20170329093247470 +modified: 20180109171254045 tags: Macros [[Core Macros]] title: list-tagged-draggable Macro type: text/vnd.tiddlywiki @@ -13,6 +13,8 @@ The <<.def list-tagged-draggable>> [[macro|Macros]] renders the tiddlers with a : The title of the tag ;itemTemplate : Optional title of a tiddler to use as the template for rendering list items +;emptyMessage +: Optional wikitext to display if there are no tiddlers with the specified tag Note that the [[ordering|Order of Tagged Tiddlers]] is accomplished by assigning a new list to the `list` field of the tag tiddler. Any `list-before` or `list-after` fields on any of the other tiddlers carrying the tag are also removed to ensure the `list` field is respected.