On Monday, March 28, 2016 at 3:17:51 AM UTC-7, Matthew Petty wrote:
>
> Eric,
> That's great, thank you. Now I can have:
> <table>
> <$list filter="[prefix[Job Number:]]">
> <tr><td>{{!!title}}</td><$list filter="[<currentTiddler>indexes[]]" 
> variable="thisIndex">
> <td><$view index=<<thisIndex>>/></td>
> </$list></tr></$list>
> </table>
> Which returns a nice table.
>
> There are still a couple of issues.
> First, if the text reference contains a wiki link, like "[[Link]]", then 
> it is not returned as a link, but just as text with the square brackets. It 
> would be nice to be able to have that as a link if it wants to be, and to 
> ignore it if not.
>

Instead of the <$view> widget, use
<$transclude index=<<thisIndex>>/>

This will cause the value to be "translated" before it is "included" in the 
output (thus, "trans"+"clude"), so that any wiki syntax contained in the 
value will be processed (e.g., [[foo]] will become a proper link to a 
tiddler named "foo")
 

> Secondly, how can I set the order of the index list? It seems to be random 
> at the moment. I'd like it to be in the order of the data in the tiddler, 
> or failing that, alphabetical.
>

As noted in the documentation for 
http://tiddlywiki.com/#indexes%20Operator, the names are returned "in no 
particular order".  However, as with any filter result, you can apply a 
[sort[]] operator to change the order:
<currentTiddler>indexes[]sort[]

Thirdly, is it possible to return the names of the values, and not the 
> values themselves? If that were possible, the a macro could be made which 
> would do something like this:
>

The indexes[] operator IS already returning the names... not the values. 
 The actual values are retrieved by the <$view> (or <$transclude>) widget. 
  Assuming that all the "Job Number" tiddlers have the same index names, 
you can write your table like this:

<table>
<$list filter="[prefix[Job Number:]limit[1]]">
<tr>
   <td> <!-- EMPTY CORNER --> </td>
   <$list filter="[<currentTiddler>indexes[]]" variable="thisIndex">
      <td><<thisIndex>></td>
   </$list>
</tr>
</$list>
<$list filter="[prefix[Job Number:]]">
<tr>
   <td>{{!!title}}</td>
   <$list filter="[<currentTiddler>indexes[]]" variable="thisIndex">
      <td><$view index=<<thisIndex>>/></td>
   </$list>
</tr>
</$list>
</table>

* The first $list widget retrieves ONE "Job Number" tiddler and uses it to 
display the headings (the index names).  Note the use of "limit[1]" so that 
only one row of headings is shown.
* The second $list widget then retrieves ALL "Job Number" tiddlers and 
displays a row for each tiddler, showing the index *values*.

Q.E.D

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
InsideTiddlyWiki: The Missing Manuals

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9fd2ef45-fc54-4686-a56c-dc77a0329530%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to