Show Changes Show Changes
Edit Edit
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Search

History

4/14/2006 2:14:42 PM
-198.97.67.57
4/14/2006 2:14:14 PM
-198.97.67.57
4/14/2006 2:12:32 PM
-198.97.67.57
4/14/2006 2:11:32 PM
-198.97.67.57
4/14/2006 2:10:43 PM
-198.97.67.57
List all versions List all versions

RSS feed for the FlexWiki namespace

Wiki Talk Questions
.
Summary
Question
Is it possible to perform standard if ... then ... else type tests using WikiTalk? My FlexWiki installation (using the WikiTalkExperimentalBuild) has a page (http://flexwiki.europe.webmatrixhosting.net/default.aspx/Salamander.PlayPage) that lists all namespaces and their topics, but this includes ContentBaseDefinition, which I'd prefer to exclude, so I thought I'd do it by testing for '_' at the start, but I have know idea how to do that.
Answer
You can do IfThenElse tests (see WikiTalkAssignmentDiscussion) but there is currently no way that I know of to test if a string begins with a specific character. -- JimmySieben [2005-09-09]

How do you iterate through a number of properties on the page with the same name?

Context:

 TODO: This is my first todo  
 TODO: This is my second todo item within the same topic

I've tried GetListProperty, but that only works for a Single TODO with commas.

I want to be able with WikiTalk to display all the TODOs in any topic, currently I can only display the last TODO from any topic with code like:

 !Topics with ""TODOs"":
 @@[
         "||{!}*Topic*||{!}*Summary*||{!}*Todo*||", Newline,
         namespace.Topics.Select{ each | 
                 each.HasProperty("TODO") }
                 .SortBy { each | 
                         each.Name 
                 }.Collect{ each |
                         [
                                 "||{+}", each.Name, 
                                 "||{+}", each.Summary,
                                 "||{+}", each.GetProperty("TODO"),
                                 "||", Newline,
                         ]
         }
 ]
 @@

I got the following code to work, but you're right - you can only have a single ToDo property entry, to get multiple values you have to separate them with commas. WFW

 @@
  [
     namespace.Topics.Select
        {  
           each | each.HasProperty("ToDo")}
              .SortBy { s | s.Name }.Collect{ 
                 e | [ 
                    "        * [", e.Name, "] - ",
                    e.HasProperty("Summary").IfTrue {e.GetProperty("Summary")} IfFalse {"*%red%needs a summary%%*"}, Newline,
                    e.GetListProperty("ToDo").Collect {
                       p | ["                * ", p, Newline]
                    }
                 ]
        }
  ]
  @@
ToDo
Not logged in. Log in

Welcome to the home of FlexWiki, an experimental collaboration tool, based on WikiWiki.

This is FlexWiki, an open source wiki engine.

This site supports the new NoFollow anti-spam initiative.
Change Style

Recent Topics