This bit here:
| <$list filter="[tag[swimmers]sort[
title]]"/> | <$edit-text tiddler="50mFreestyle" field="time"/> |
needs to be rewritten something like:
<table>
<$list filter="[tag[swimmers]sort[title]]">
<tr><td><$view field="title"/></td><td><$edit-text field="50mFreestyleTime"
/> </td></tr>
</$list>
</table>
... (untested) where I assume each swimmer's tiddler has a field
"50mFreestyleTime" (You don't have to make the field in advance)
All your activity needs to happen inside of the <$list></$list> construct.
You have to be sure to balance all the tags. I've never had much luck using
the Pipes inside of <$list>, so I just use HTML table tags instead.
On Sunday, October 25, 2015 at 8:44:12 PM UTC-7, Dave wrote:
>
> In TWC you could create a dynamically generated table using
> ForEachTiddlerPlugin, something like this:
>
> <<forEachTiddler
> where
> 'tiddler.tags.contains("ClinicalDiagnoses")'
> sortBy
> 'store.getValue(tiddler,"wt")'
> descending
> write
> '(index < 5) ? "| [["+tiddler.title+"]] |
> ("+store.getValue(tiddler,"wt")+") | +++^*@[>]...<<tiddler
> "+tiddler.title+"\>\>===|\n" : ""'
> >>
>
>
> Is there a relatively simple equivalent in the current TW5? I see
> something like it in this thread about editable tables:
>
>
> https://groups.google.com/forum/#!searchin/tiddlywiki/editable$20tables/tiddlywiki/XeCYubR8YrU/J_buhitP9zsJ
>
> , but I was wondering if there's a simpler way (I look at that code and
> don't really understand it yet) to do the same thing?
>
>
>
>
> The use case is this: I'm trying to learn TW5 by making a TW for
> assisting in swim coaching. I have a group of tiddlers (names of swimmers)
> tagged "swimmers", and I want to be able to generate a tiddler with a table
> of names and editable times based on something like this:
>
> | <$list filter="[tag[swimmers]sort[title]]"/> | <$edit-text
> tiddler="50mFreestyle" field="time"/> |
>
> but of course this will make only one row with all the names in the first
> cell and a single edit box for the one field
>
>
>
> here's another idea I had that doesn't work:
>
> macro:
> \define race(name:"name" time:"0:00")
> | $name$ | <$edit-text tiddler="50mFreestyle-$name$" field="time"/> |
> \end
>
> tiddler that calls the race macro:
> <<race name:"<$list filter="[tag[swimmers]sort[title]]"/>">>
>
>
>
> Ideally maybe there's a way to dynamically create a DataTiddler in the
> DictionaryTiddler format... I'm okay with having the info attached to the
> swimmers tiddlers but it would probably be better to end up with
> DataTiddlers for each "race"
>
>
> Any suggestions?
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/03255191-e939-404e-ab0c-2bdc56a90542%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.