2022-04-30 09:00:38 +00:00
|
|
|
title: Transclude/CustomWidget/ActionWidget
|
2022-04-26 12:05:44 +00:00
|
|
|
description: Custom widget definition
|
|
|
|
type: text/vnd.tiddlywiki-multiple
|
|
|
|
tags: [[$:/tags/wiki-test-spec]]
|
|
|
|
|
|
|
|
title: Output
|
|
|
|
|
|
|
|
\whitespace trim
|
2022-04-30 09:00:38 +00:00
|
|
|
<$transclude $tiddler='Result'>
|
|
|
|
</$transclude>
|
2022-04-26 12:05:44 +00:00
|
|
|
_
|
|
|
|
title: Actions
|
|
|
|
|
|
|
|
\whitespace trim
|
|
|
|
<!-- Define the <$action-mywidget> widget by defining a transcludable variable with that name -->
|
|
|
|
<$set name="<$action-mywidget>" value="""\whitespace trim
|
|
|
|
<$parameters one='Jaguar'>
|
|
|
|
<$action-setfield $tiddler="Result" $field="text" $value=<<one>>/>
|
|
|
|
</$parameters>"""
|
|
|
|
>
|
|
|
|
<$action-mywidget one="Dingo">
|
|
|
|
Crocodile
|
|
|
|
</$action-mywidget>
|
|
|
|
</$set>
|
|
|
|
_
|
|
|
|
title: ExpectedResult
|
|
|
|
|
|
|
|
<p>Dingo</p>
|