2022-04-30 09:00:38 +00:00
|
|
|
title: Transclude/CustomWidget/Simple
|
2022-04-24 20:24:38 +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='TiddlerOne' one='Ferret'>
|
|
|
|
</$transclude>
|
2022-04-24 20:24:38 +00:00
|
|
|
_
|
|
|
|
title: TiddlerOne
|
|
|
|
|
|
|
|
\whitespace trim
|
|
|
|
<!-- Define the <$mywidget> widget by defining a transcludable variable with that name -->
|
2022-05-02 09:56:22 +00:00
|
|
|
\function <$mywidget>(one:'Jaguar')
|
|
|
|
\whitespace trim
|
|
|
|
<$text text=<<one>>/>
|
|
|
|
<$slot $name="ts-body">
|
|
|
|
Whale
|
|
|
|
</$slot>
|
|
|
|
\end
|
|
|
|
<$mywidget one="Dingo">
|
|
|
|
Crocodile
|
|
|
|
</$mywidget>
|
2022-04-24 20:24:38 +00:00
|
|
|
_
|
|
|
|
title: ExpectedResult
|
|
|
|
|
|
|
|
<p>DingoCrocodile</p>
|