[TW5] Listing fields

64 views
Skip to first unread message

plerudulier

unread,
May 1, 2015, 4:59:21 AM5/1/15
to tiddly...@googlegroups.com
Hello everybody,

    Here's the code I use to list all projects I currently work on :

{{{ [tag[Projets]sort[title]] }}}

    It is fairly easy to understand : listing of all tiddlers I've tagged "Projets".

   Now I add fields 'tasks' {task1, task2, task3, ..., taskn} in each project. How can I list those tasks in each project ?
   I currently merely call them in the body of the text like so {{!!task1}}, {{!!task2}}, etc.

  Would the code be close to this : {{{ [field¹[task*²]] }}} ?

¹ : is the generic name of fields 'field' ? (like it is 'tag' for all tags, 'title' for all titles and 'text' for all content of body)
² : is there such a thing as a generic character ? *, %, ?, etc.

Hope this is clear enough and that someone will have a solution for it?

Happy 1st of May you all.

Pascal

Jed Carty

unread,
May 2, 2015, 2:40:01 PM5/2/15
to tiddly...@googlegroups.com
There isn't a special wildcard character, but the regexp can use regular expressions to achieve the same thing. But in this case that would be overkill.

If you want to list every task field in a project you use this:

{{{ [is[current]fields[]prefix[task]] }}}

displaying the content of each task field is easier to do using the $list widget like this:

<$list filter='[is[current]fields[]prefix[task]]' variable=ThisTask>

<$view field=<<ThisTask>>/>
</$list>

Jed Carty

unread,
May 2, 2015, 2:43:25 PM5/2/15
to tiddly...@googlegroups.com
You may want to use a custom view template. They are discussed here. You could use modify tagging list example from that page by replacing the inside list widget with what I put in my previous post.

Pascal le Rudulier

unread,
May 2, 2015, 3:15:36 PM5/2/15
to tiddly...@googlegroups.com
Super nice of you Jed to answer.
Actually what {{{ [is[current]fields[]prefix[task]] }}} does is that it lists the names of the fields not their content, but the $list widget you suggest does the trick.
Again thank you very much.
Pascal

2015-05-02 20:43 GMT+02:00 Jed Carty <inmy...@gmail.com>:
You may want to use a custom view template. They are discussed here. You could use modify tagging list example from that page by replacing the inside list widget with what I put in my previous post.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywikidev/OKb-0vsbUSQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/636d16e4-d86a-4760-8ed8-df8305253fec%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages