
![]() |
HomePage |
![]() |
JW Davidson |
![]() |
Show Changes |
![]() |
|
![]() |
Recent Changes |
![]() |
Subscriptions |
![]() |
Lost and Found |
![]() |
Find References |
| Local Search |
History
| 9/12/2007 3:32:07 PM |
| -10.10.192.22 |
| 8/19/2007 4:39:21 PM |
| -66.78.124.101 |
| 8/19/2007 4:38:46 PM |
| -66.78.124.101 |
| 8/19/2007 4:38:14 PM |
| -66.78.124.101 |
| 8/19/2007 4:36:17 PM |
| -66.78.124.101 |
![]() |
List all versions |
||The WikiTalk topic summary is: @@topics.WikiTalk.Summary@@||
Would generate this text:
| The WikiTalk topic summary is: WikiTalk is a language for including dynamic content in FlexWiki topics. |
WikiTalk is object oriented. All data types are objects (strings, integers, booleans, Topics, Federations, etc.)
If/Then constructs are accomplished through methods on "Boolean":/default.aspx/TestJwd/InstructionCard.html?type=Boolean objects.
@@"Monday".Equals(DateTime.Now.DayOfWeek).IfTrue {"''Mondays stink''"} IfFalse {"''Most of the week is good''"}@@
Output: Mondays stink
The IfTrue/IfFalse construct actually maps to the IfTrueIfFalse method on the "Boolean":/default.aspx/TestJwd/InstructionCard.html?type=Boolean object. The previous example is normally written:
@@"Monday".Equals(DateTime.Now.DayOfWeek).IfTrueIfFalse( {"''Mondays stink''"}, {"''Most of the week is good''"} ) @@
Output: Mondays stink
Looping is accomplished through "Block":/default.aspx/TestJwd/InstructionCard.html?type=Blocks which are chunks of WikiTalk code surrounded by {}. The syntax of a block is {parameters... | value}. In the following example, the variable named theparameter is used to loop through elements in an array created by ["Array element1 ", "Array element2 "] :
@@{theparameter | ["Array element1", "Array element2"]}.Value{each | each.Value}@@
Output: Array element1Array element2
@@{theparameter | ["Array element1", "Array element2"]}.Value{what, ever | "whatever, it does not matter"}@@
Output: Array element1Array element2
@@{theparameter | ["Array element1", "Array element2"]}.Value(0)@@
Output: Array element1Array element2
For more information on looping, see WikiTalkLoopingDemo
WikiTalk supports functions. Functions are WikiTalk Blocks (see reference in "Looping" above) which have one or more FlexWikiParameters. Functions are named by putting them in a topic's property. This is an example of a function named Hithere:
:Hithere:{ firstname, lastname |
[ "Hi there ", firstname, lastname, "! You got to this page on ", DateTime.Now ]
}
Note that the property name Hithere begins with a colon. This tells FlexWiki that the WikiPageProperty named Hithere is hidden. For a more advanced discussion on the usage of functions, see WikiTalkFunction.
The function is called within the topic page by using the function name and passing the parameters in parens. For example
@@Hithere("Tim ", "Smith")@@
would output:
Hi there Tim Smith! You got to this page on 9/8/2008 10:14:39 AMTo call a function in another topic, use the With property which brings the other topic's properties into scope. This example puts InstructionCard in this topic's scope and then calls the LinkToInstructionCard function.
With: InstructionCard
This is a link to documentation on @@LinkToInstructionCard("Boolean")@@
Another way to call a function defined in another topic is to directly access the topic through the topics array. For example:
@@topics.WikITalkLanguageOverview.Hithere("Tim ", "Smith")@@
would output:
Hi there Tim Smith! You got to this page on 9/8/2008 10:14:39 AMNote that in this example, WikITalkLanguageOverview is the topic name that contains the HiThere function. topics.WikITalkLanguageOverview is returning a DynamicTopic which gives you access to the functions defined in the topic.

| Not logged in. | Log in | |
The wiki for all things Objective Design Solutions
| Recent Topics | |
![]() |
WikiTalkLanguageO... |
![]() |
List all versions |
![]() |
| Change Style |
| Powered by Flexwiki v2.0.0.218 |