On Sunday, August 6, 2017 at 1:00:52 PM UTC-7, AlanBCohen wrote:
>
> Eric,
> Found some more HTML docs on tables. This is closer to what I want, but 
> the currentTiddler and currentTags in the table aren't displaying.
>
> ''Tiddlers with the tag 'Journal', sorted by modified. Tiddler.text 
> displayed on same line.''
> <table>
> <tr>
> <th>Title </th>
> <th>Tags </th>
> <th>Text </th>
> </tr>
> <$list filter="[tag[Journal]sort[modified]]">
> <tr>
> <td><<link><<currentTiddler>></td>
> <td><<tiddlerTag>></td>
> <rd><$transclude></td>
> </tr>
> </$list>
> </table>
>
> I think the remaining problems are with the referencing the current line's 
> Tiddler fields. The old TW2 fields were referenced as tiddler.title, 
> tiddler.tags, tiddler.text. What are the equivalent field names and syntax?
>

1) Be careful with your syntax.
   * TW widgets have this form: <$foo>...</$foo> (i.e., matching <$...> and 
</$...> 
   * all widget names start with $
   * only 1 set of brackets (i.e., <$foo>.... NOT <<$foo>>)
   * handling of the content within the widget depends on the type of widget
   * if the widget does not have any content, you can use an abbreviated 
form: <$foo /> (note the trailing "/")

2) Within the <$list>...</$list> widget, all content is relative to the 
<<currentTiddler>> value.  You can refer to any field within the tiddler 
using the <$view> widget. To display the tags for the currentTiddler, use
   <$view field="tags"> no tags </$view>
   * the content within the <$view>...</$view> is fallback text if the 
specified field is missing or empty.
   * if you don't want/need fallback content, you can use the abbreviated 
form: <$view field="tags" />

3) Just like the <$view> widget, content within the 
<$transclude>...</$transclude> widget is used as a fallback if the 
tiddler/field does not exist.  If no tiddler is specified, the 
currentTiddler value is used by default.  If no field is specified, the 
"text" field is used by default. Thus,
   <$transclude tiddler=<<currentTiddler>> field="text"> no text 
</$transclude>
will display the text from the currentTiddler, or "no text" if the tiddler 
or field does not exist.
  * In the above example, you can omit the "tiddler" and "field" params 
(since they specify the defaults), and just write: <$transclude> no text 
</$transclude>
  * If you don't want/need fallback content, you can use the abbreviated 
form: <$transclude /> (again, note the trailing "/")

Here's your code, cleaned up a bit:
<table>
   <tr>
      <th>Title </th>
      <th>Tags </th>
      <th>Text </th>
   </tr>
   <$list filter="[tag[Journal]sort[modified]]">
      <tr>
         <td><$link><<currentTiddler>></$link></td>
         <td><$view field="tags"> no tags </$view></td>
         <td><$transclude /></td>
      </tr>
   </$list>
</table>

let me know how it goes...

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/04fcfad0-df0e-480d-8ad5-60a7eec7e490%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to