Does anyone know how I can do this?
\define name_output(species,first,second,third)
<$setvars
twothreename="""
(\$third$\ ? \$third$, $first$ $second$\) ||
\$second$, $first$\
"""
formatted_name="""
(\$species$\ == \Human\ ? twothreename ) ||
(\$species$\ == \Bajoran\ ? \$first$ $second$\) ||
(\$species$\ == \Garbrini\ ? \$second$, $first$ $third$\) ||
\$first$\
""">
<<formatted_name>>
</$setvars>
\endHere are the fields in an example character tiddler:
caption: <<name_output Human John Brown Doe>>
species: Human
|
This email has been sent from a virus-free computer protected by Avast. www.avast.com |
--Best wishes,Tobias.
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/NwaJdnB_yTU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/73772a65-a91b-4112-8795-cfbaa90a0ac6%40googlegroups.com.
Out of curiosity, in what order are macros, text references, widgets, etc used?
\define macro:(macro,1,2,3,4,5,6,7,8,9,10) <<$macro$ '''$1$''' '''$2$''' '''$3$''' '''$4$''' '''$5$''' '''$6$''' '''$7$''' '''$8$''' '''$9$''' '''$10$'''>>\define text:(reference) {{$reference$}}
<<macro: version>>
<<macro: now YYYY0MM0YY>>
<<text: {[tag[HelloThere]]}>>
<<text: HelloThere>>
|
This email has been sent from a virus-free computer protected by Avast. www.avast.com |
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/NwaJdnB_yTU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f5ac5407-c51b-4034-a002-b1aca693f70b%40googlegroups.com.
I was wondering about the order in which those kinds of things are run. For example, are widgets evaluated before or after macro calls? I'm trying to figure this out so I know what I can use where and in what order TiddlyWiki will evaluate them.