[
    {
        "created": "20141119111133020",
        "creator": "Tobias Beer",
        "text": ";&#10102; General wiki text (including inside macros)\n:For additional possibilities with inside macros see ''&#10104; Within macro definitions'' below.\n: literal values \n: `<br>` `<hr>` html tags imediate closure\n: `<section>   </section>` later closure\n: `<<variable/macrocall [params]>>`  imediate closure, see &#10112; for later closure\n: `<$widgetname [params] />` imediate closure\n: `<$widgetname [params]> inside the widget </$widgetname>` later closure (for more see &#10113; Content of widgets)\n: `{{tiddlername}}` transclude the content of the tiddlername's text field and render\n: `{{!!fieldname}}` transclude the content of the currentTiddlers fieldname and render\n: `{{tiddlername!!fieldname}}` transclude the content of the tiddlername's fieldname and render and render\n: `{{{ [<currentTiddler>addprefix[$:/myprefix/]] }}}` filtered transclusion, see also &#10107; More on filtered transclusions\n: @@.warn ~~`<variable>`, `\"<variable>\"`,  `[[<variable>]]`~~@@\n\n;&#10103; Widget and HTML attributes or parameters [[html element attributes|https://tiddlywiki.com/#HTML%20in%20WikiText]], e.g. `$macrocall`\n: `<$widget attribute=\"literal value\"/>`\n: `<$widget attribute=<<variable>>/>`\n: `<$widget attribute=<<callMacroToComputeValue>>/>`\n: `<$widget attribute={{transclusion}}/>`\n: `<$widget attribute={{{ filter }}}/>`  filtered transclusion\n: `<htmltag attribute=\"literal value\"/>`\n: `<htmltag attribute=<<variable>>/>` \n: `<htmltag attribute=<<callMacroToComputeValue>>/>`\n: `<htmltag attribute={{transclusion}}/>`\n: `{{!!transclusion}}` a field whos value can also be inside `[[  ]]`????\n: @@.warn ~~`<$widget attribute=\"prefix-<<variable>>\"/>`~~@@\n: @@.warn ~~`<$widget attribute=[[prefix-<<variable>>]]/>`~~@@\n: @@.warn ~~`<$widget attribute=\"prefix-{{transclusion}}\"/>`~~@@\n\n;&#10104; Within macro definitions\n://Within macro definitions refers to the following cases//\n\n```\n\\define macrocname(parms) In here\n\\define macrocname(parms) here\nand in here\n\\end\n```\n\n:Keep in mind macros definitions also have full access to wiki text as documented in &#10102; General wiki text (including inside macros)\n:\"Note: representations using the $ sign are 'substitutions' so you must provide the delimiters such as quotes with the substitution if required'\"\n:See footnote ''&#10114; The value of Substitutions'' for more\n: `$macroParameter$`, `\"$macroParameter$\"`, `[[$macroParameter$]]` `<<__macroParameter__>>`\n: `$(variable)$` references a variable from the context of the calling macro, this is away to avoid the use of a paramerter in macrocalls.\n: `<<__macroParameter__>>`\tParameter-as-variable access to a parameter defined in the macro parameters list as it it were a variable.\n::There are a few cases where a substitution may not be suitable but a variable is.\n: `<$widget attribute=\"prefix-$macroParameter$\"/>`\n: `<$widget attribute=$macroParameter$/>` (unsafe when having spaces)\n:.warn ~~`$variable$`, `\"$variable$\"`, `[[$variable$]]` ~~ ?????\n\n;&#10105; macro parameters [[Macro Calls in WikiText|https://tiddlywiki.com/#Macro%20Calls%20in%20WikiText]]\n: `<<macroname \"1st\" \"2nd\">>` refers to Nth paramter in macro definition\n: `<<macroname param:\"value\">>` refers to the name paramter\n: `<<macroname param:\"$macroParameter$\">>` (only inside macro)\n: Since parameters in macros is limited, we use the macrocall widget to give the same paramater possibilities as widgets.\n: `<$macrocall $name=macroname param=\"literal\" param1=<<variable>>  param2={{transclusion}} param3={{{ filter }}} />`\n::in the macrocall widget you ''need'' to know the parameter name to pass a value\n:The following missueses can be remidied by the use $(variable)$ in the macro definition, or use the macrocall widget\n: @@.warn ~~`<<macroname <<variable>> >>`~~@@ \n: @@.warn ~~`<<macroname \"<<variable>>\" >>`~~@@\n: @@.warn ~~`<<macroname param:<<variable>> >>`~~@@\n: @@.warn ~~`<<macroname {{transclusion}}>>`~~@@\n: @@.warn ~~`<<macroname param:{{transclusion}}>>`~~@@\n\n;&#10106; in filters\n:There is no need in filters to differentiate between html and widgets tags so only single delimiters are needed.\n:Also once a delimiter is in use, you can avoid using the `[]` you would have needed. So an `operator[literalvalue]` becomes `operator<varname>`\n:Operator below refers to any [[filter operator|https://tiddlywiki.com/#Filter%20Operators]] eg \"tag\"\n: `[operator<variable>]` (no inner square brackets!)\n: `[operator{transclusion}]` (only single curly brackets!)\n: `[operator{!!fieldname}]`               \"\n: `[operator{tiddlername!!fieldname}]`    \"\n\n: `operator[$macroParameter$]` (only filters within macros)\n\n:.warn ~~`[operator[$(variable)$]]`~~ test this!\n:.warn ~~`[operator<macroname parameter>]`~~ Macros used in filters can not contain parameters to the macro\n:: workaround - use the wikify widget\n\n```\n<$wikify name=newvar text=\"\"\"<<macroname parameter>>\"\"\">\n... [operator<newvar>] ....\n</$wikify>\n```\n\n;&#10107; More on filtered transclusions\n:Also refered to as triple curly braces `{{{ filter }}}` they excel in particulare uses\n\n:`{{{ somename }}}` {{{ somename }}} a tiddler link\n:`{{{ some name }}}` {{{ some name }}} two tiddler links\n:`{{{ [[some name]] }}}` {{{ [[some name]] }}} tiddler whos title contains spaces\n:`{{{ [[somename]get[caption]else{!!title}] }}}` {{{ [[somename]get[caption]else{!!title}] }}} tiddler whos title contains spaces\n:filtered transclusions can be placed inside a TextWidget to return only text (not something later rendered)\n:`'<$text text={{{ [[somename]get[caption]else{!!title}] }}}/>'` '<$text text={{{ [[somename]get[caption]else{!!title}] }}}/>' use text so the caption does not become a link\n\n<hr>\n<h3>''Footnotes''</h3>\n\n;&#10112; The following is an example of ''later closure'' of a macro;\n```\n<<variable \n[params]\n>>\n```\n\n;&#10113; Content of widgets\n:Sometimes used OR for example The content of the `<$text>` widget is not used.\n::This may be an opportunity to add notes in your wiki text that will not be displayed in the result\n:In many cases such as the ListWidget the content is used such as for the display templated of the list results\n::If the template=parameter is used then the widger content is not used\n: `<$widgetname [params]> inside the widget </$widgetname>` later closure\n\n```\n<$widgetname [params]>\n   inside the widget \n</$widgetname>\n```\n\n:The ''macrocall widget'' is a case in point, The content of the `<$macrocall>` widget is ignored. So we can use it as such;\n\n```\n<&macrocall $name=macroname param=\"literal\" param1=<<variable>>  param2={{transclusion}} param3={{{ filter }}} >\nSo in here we could document the function and paramters of this particular macrocall\n/>\n```\n\n;&#10114; The value of Substitutions \n:A key advantage of substitutions (in macros) is their placement can also be a concatination of values. \n::see also &#10107; More on filtered transclusions (also for concatination)\n```\n\\define concatinate-parameters(param1 param2) $param1$/$param2$\n\\define concatinate-variables() $(currentTiddler)$/$(subtiddler)$\n\n<<concatinate-parameters tiddlername subtiddler>>\n\n<$set name=subtiddler value=\"mysubtiddler\">\n  <<concatinate-variables>>\n</$set>\n```\n::*The $(...)$ syntax means \"substitute the variable defined before this macro was invoked\".\n::This is a way of accessing values without the use of actual macro parameters, get or set the variable before calling the macro\n\n:Original now abridged source http://pv5.tiddlyspot.com\n:See [[discussion|https://groups.google.com/d/msg/tiddlywiki/_x9CDAFtwQc/Qlng28uWNKIJ]]...",
        "type": "text/vnd.tiddlywiki",
        "title": "Standard Nomenclature",
        "tags": "[[TiddlyWiki References and variables]]",
        "sort-key": "Variables vs. Parameters",
        "revision": "0",
        "referencesource": "http://tobibeer.github.io/tb5/#Variables%20vs.%20Parameters",
        "modifier": "Anthony Muscio",
        "modified": "20200928012736580"
    }
]