2014-09-10 23:06:19 +00:00
caption: macrocall
2020-09-28 10:30:28 +00:00
created: 20131024141900000
2023-04-19 10:32:34 +00:00
modified: 20230419103154328
2022-10-07 15:56:21 +00:00
tags: Widgets $:/deprecated
2020-09-28 10:30:28 +00:00
title: MacroCallWidget
type: text/vnd.tiddlywiki
2013-10-31 22:03:40 +00:00
2022-10-07 15:56:21 +00:00
<<.deprecated-since "5.3.0" "TranscludeWidget">>
The <<.wlink MacroCallWidget>> widget is deprecated. While it will continue to work, users are now advised to use the <<.wlink TranscludeWidget>> widget, converting the `$name` attribute to `$variable`.
2013-10-31 22:03:40 +00:00
2022-09-09 13:15:56 +00:00
For example,
2013-10-31 22:03:40 +00:00
```
2022-09-09 13:15:56 +00:00
<$macrocall $name="my-macro" my-parameter="Elephant"/>
2020-09-28 10:30:28 +00:00
```
2022-09-09 13:15:56 +00:00
should be changed to:
2020-09-28 10:30:28 +00:00
```
2022-09-09 13:15:56 +00:00
<$transclude $variable="my-macro" my-parameter="Elephant"/>
2013-10-31 22:03:40 +00:00
```
2022-09-09 13:15:56 +00:00
Internally, the <<.wlink MacroCallWidget>> widget is implemented via the <<.wlink TranscludeWidget>> widget.
2022-01-23 09:44:01 +00:00
2013-10-31 22:03:40 +00:00
! Content and Attributes
2022-09-09 13:15:56 +00:00
The content of the <<.wlink MacroCallWidget>> widget is ignored.
2013-10-31 22:03:40 +00:00
|!Attribute |!Description |
|$name |Name of the macro to invoke |
2013-11-04 10:00:02 +00:00
|$type |ContentType with which the macro text should be parsed (defaults to `text/vnd.tiddlywiki`) |
2020-09-28 10:30:28 +00:00
|$output |ContentType for the output rendering (defaults to `text/html`, can also be `text/plain` or `text/raw`) |
2013-10-31 22:03:40 +00:00
|//parameters// |Macro parameters specified as attributes |