From ab129a620e13d3df5a7e58c5aa9ca044a16923d4 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 6 Dec 2014 13:44:08 +0000 Subject: [PATCH] Add basic tag macro --- core/wiki/macros/tag.tid | 6 +++++ .../demonstrations/Tagged with TagMacro.tid | 4 +++ editions/tw5.com/tiddlers/macros/TagMacro.tid | 27 +++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 core/wiki/macros/tag.tid create mode 100644 editions/tw5.com/tiddlers/demonstrations/Tagged with TagMacro.tid create mode 100644 editions/tw5.com/tiddlers/macros/TagMacro.tid diff --git a/core/wiki/macros/tag.tid b/core/wiki/macros/tag.tid new file mode 100644 index 000000000..b65bfc046 --- /dev/null +++ b/core/wiki/macros/tag.tid @@ -0,0 +1,6 @@ +title: $:/core/macros/tag +tags: $:/tags/Macro + +\define tag(tag) +{{$tag$||$:/core/ui/TagTemplate}} +\end diff --git a/editions/tw5.com/tiddlers/demonstrations/Tagged with TagMacro.tid b/editions/tw5.com/tiddlers/demonstrations/Tagged with TagMacro.tid new file mode 100644 index 000000000..3b7c645b4 --- /dev/null +++ b/editions/tw5.com/tiddlers/demonstrations/Tagged with TagMacro.tid @@ -0,0 +1,4 @@ +title: Tagged with TagMacro +tags: TagMacro + +This tiddler is to demonstrate the TagMacro. diff --git a/editions/tw5.com/tiddlers/macros/TagMacro.tid b/editions/tw5.com/tiddlers/macros/TagMacro.tid new file mode 100644 index 000000000..b80d91e79 --- /dev/null +++ b/editions/tw5.com/tiddlers/macros/TagMacro.tid @@ -0,0 +1,27 @@ +caption: tag +created: 20141206130540337 +modified: 20141206130540337 +tags: Macros +title: TagMacro +type: text/vnd.tiddlywiki + +The 'tag' macro displays a tag pill for a specified tag. + +! Parameters + +|!Position |!Name |!Description |!Default | +|1st |tag |Title of tag |The current tiddler | + +! Examples + +For example: + +``` +* <> +* <> +``` + +Returns: + +* <> +* <>