Radiobutton as Makro

81 views
Skip to first unread message

Gerald Weis

unread,
Mar 23, 2020, 8:52:31 AM3/23/20
to TiddlyWiki
Hello Friends,

the code in the box works.

But i want it to have as Makro

is it possible that can do? It must to works in a lot of tiddler with diverse values.


<div class="illvital">

<<Headline "illvital" Körperanalysen
<br>Körpertyp>>

<table>
<
<tabueb>>
<tr valign=top align=center>
<td><$radio field="modifier" value="11"><br>wenig Fett/<br>dünn</$radio></td>
<td><$radio
 field="modifier" value="12">
<br>Übergewicht/<br> zu
hoher
<br>Fettgehalt </$radio></td>
<td><$radio field="modifier" value="13"><br>Adipös/<br>fettleibig </$radio></td>
</tr>
<tr valign=top align=center>
<td><$radio
 field="modifier" value="21">
<br>geringes
Gewicht/
<br>dünn<br><br></$radio></td>
<td><$radio field="modifier" value="22"><br>Norm<br><br></$radio></td>
<td><$radio
 field="modifier" value="23">
<br>hohes
Gewicht/
<br>muskulös<br><br></$radio></td>
</tr>
<tr valign=top align=center>
<td><$radio
 field="modifier"
value="31">
<br>fettarm/<br>dünn<br><br></$radio></td>
<td><$radio
 field="modifier"
value="32">
<br>fettarm/<br>muskulös<br><br></$radio></td>
<td><$radio
 field="modifier" value="33">
<br>hohes
Gewicht
<br>muskulös<br><br></$radio></td>
</tr>
</table>


TonyM

unread,
Mar 23, 2020, 9:47:49 PM3/23/20
to TiddlyWiki
Does this not work?

\define Makro()
\end
<<Makro>>

I cant read code very will with another language in it, but I am curious why this updates the modifier field tested on tiddlywiki.com

Regards
Tony

Gerald Weis

unread,
Mar 24, 2020, 1:36:06 PM3/24/20
to TiddlyWiki
hello Tony,

then i have the radiobuttonmatrix showing in the Makrofile

but not in the tiddler where i want to use it.
Message has been deleted

TonyM

unread,
Mar 24, 2020, 6:38:58 PM3/24/20
to TiddlyWiki
Gerald,

If the Makrofile/tiddler containing the macro definition is tagged with $:/tags/Macro then <<Makro>> will be available in any tiddler.

However an alternative is to not define it as a macro but put your code in a tiddler lets call it makrotemplate
then where you want to use it in any tiddler, 
`{{||makrotemplate}}` the `||` says use the currentTiddler when transcluding.

As long as a macro - or a template is designed to operate on the currentTiddler it is easy to include it in any tiddler.

I hope this helps without giving too much information

Tony

Gerald Weis

unread,
Mar 25, 2020, 4:10:49 AM3/25/20
to TiddlyWiki
Hello Tony

the tiddler wich contains the radiobutton-macro is the standard-macro-tiddler of this wiki.
All macros works.
Only the radiobutton-macro doesnt.
This as Information
Reply all
Reply to author
Forward
0 new messages