2014-09-11 00:06:19 +01:00
caption: macrocall
2020-09-28 11:30:28 +01:00
created: 20131024141900000
2023-04-19 11:32:34 +01:00
modified: 20230419103154328
2022-10-07 16:56:21 +01:00
tags: Widgets $:/deprecated
2020-09-28 11:30:28 +01:00
title: MacroCallWidget
type: text/vnd.tiddlywiki
2013-10-31 22:03:40 +00:00
2022-10-07 16:56:21 +01: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 14:15:56 +01:00
For example,
2013-10-31 22:03:40 +00:00
```
2022-09-09 14:15:56 +01:00
<$macrocall $name="my-macro" my-parameter="Elephant"/>
2020-09-28 11:30:28 +01:00
```
2022-09-09 14:15:56 +01:00
should be changed to:
2020-09-28 11:30:28 +01:00
```
2022-09-09 14:15:56 +01:00
<$transclude $variable="my-macro" my-parameter="Elephant"/>
2013-10-31 22:03:40 +00:00
```
2022-09-09 14:15:56 +01:00
Internally, the <<.wlink MacroCallWidget>> widget is implemented via the <<.wlink TranscludeWidget>> widget.
2022-01-23 04:44:01 -05:00
2013-10-31 22:03:40 +00:00
! Content and Attributes
2022-09-09 14:15:56 +01: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 11:30:28 +01: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 |