[TW5] Formatting automatic lists

1,346 views
Skip to first unread message

Richard Evans

unread,
Jan 16, 2016, 3:32:58 AM1/16/16
to TiddlyWiki
Hi,

When I create an automatic list, there doesn't seem to be anyway to format the list items, e.g. give each one bullet and indentation for instance. That would be a start.

What I would really like to do is display a tag, as a suffix to the automated list item. What I have in mind is:

  • list item - FIXME
  • list item - DONE

where the captial letters represent the tags I want to add.


As the list items are documentation, using a checkbox is not appropriate.


I am still struggling to come to grips with TiddlyWiki 5, so I apologise if this is covered somewhere, if it is I haven't been able to find it.


I have to say, I find the documentation is rather simplistic, it just covers the basics. In various examples, I have found, people are using far more advanced techniques, but I can find no documentation for these techniques


       Sincerely Richard.

Jed Carty

unread,
Jan 16, 2016, 5:25:06 AM1/16/16
to TiddlyWiki
It sounds like you want templates. If you use a list like this:

<$list filter='[tag[Hi]]'>
*<$view field=title/> - <$list filter='[is[current]tags[]]'/>

</$list>

then each tiddler returned by the first filter will be displayed using what is inside the list tags.

I am (slowly) writing some introduction materials about this on my site here.

Here are some reference sites:

http://erwanm.github.io/tw-community-search/# - The tiddlywiki community search. It is a large searchable listing of existing tiddlywiki reference sites

http://inmysocks.tiddlyspot.com/#What%20to%20do - The wiki reference wiki, the site I maintain

https://tobibeer.github.io/tb5/#Welcome - tb5, the reference wiki maintained by Tobias

Richard Evans

unread,
Jan 16, 2016, 3:52:56 PM1/16/16
to TiddlyWiki
Thank you Jed, that goes part of the way but it doesn't really do what I want.

What I am trying to do is use TW5 for program design. As a result I have a tiddler for each Actor, Data Structure, Use Case etc. I am then collecting them together in summary tiddlers. I use tags (Actor, Data Structure, Use Case, etc.) to mark the various design compoents. The summary tiddlers are just automated lists of tiddlers that have a specific design component tag. That is all easily achievable under basic TW5.

I want to extend it so that I can tag the design component tiddlers with a progress tag, e.g. First Pass, Second Pass, Final, FIXME etc. This is the reason for my question.

Your suggestion only seems to go part of the way. If I use:


<$list filter='[tag[Hi]]'>

*<$view field=title/> - <$list filter='[is[current]tags[]]'/>

</$list>

I get:

*    UseCase1 -
*    UseCase2 - UseCase2
*    UseCase3 -
*    UseCase4 -
UseCase4

The UseCase names are ordinary text not links as they were before, and instead of the progress tag name I get a link to the tiddler. I've tried playing around with the code, but none of my attempts have succeeded. I am sorry to come back on this. I can work out the logic of most computer languages, but the logic behind TW5 code defeats me.

Plus when I search on a keyword $list for instance I get nothing useful, so I am struggling.

Eric Shulman

unread,
Jan 16, 2016, 4:12:57 PM1/16/16
to tiddl...@googlegroups.com
On Saturday, January 16, 2016 at 12:52:56 PM UTC-8, Richard Evans wrote:

<$list filter='[tag[Hi]]'>
*<$view field=title/> - <$list filter='[is[current]tags[]]'/>
</$list>

I get:
*    UseCase1 -
*    UseCase2 - UseCase2
*    UseCase3 -
*    UseCase4 -
UseCase4

The UseCase names are ordinary text not links as they were before, and instead of the progress tag name I get a link to the tiddler.

Try this:
<$list filter="...">
* <$link><$view field="title" /></$link> - <$view field="tags" />
</$list>


I've tried playing around with the code, but none of my attempts have succeeded. I am sorry to come back on this. I can work out the logic of most computer languages, but the logic behind TW5 code defeats me.

There are some curious anomalies in the TW5 native syntax... for example, you can write recursive macros that "walk" a tag-linked Table of Contents... but you need a plugin to just add two numbers and store the result in a tiddler field.  Still... it is a remarkably powerful and flexible syntax... once you get over the learning curve.

Plus when I search on a keyword $list for instance I get nothing useful, so I am struggling.

Search for "ListWidget" on tiddlywiki.com

Also, these are good reference links to keep handy:

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

Matabele

unread,
Jan 17, 2016, 1:31:01 AM1/17/16
to TiddlyWiki
Hi Richard

Sometimes best to use a little html -- try something like this:

<ul><$list filter="[tag[mytag]]">
<li>
<<currentTiddler>><$list filter="[is[current]list[!!tags]]" variable="tag"> -- <<tag>></$list>
</li>
</$list></ul>

regards

Matabele

unread,
Jan 17, 2016, 2:24:57 AM1/17/16
to TiddlyWiki
Hi Richard

I have been playing around with the ActionListops widget, along with my new 'cycle[]' filter operator:
-- I have posted a demo that might suit your purpose here.
-- play around with the demo (scroll down to the 'Cycle Status Demo' and click the #tags)
-- if it suits, to get this working in TW-5.1.10, you will need to:
    * copy the amended 'x-listops' filters (from the system tab) from the demo wiki to your wiki
    * save and refresh you wiki.

regards

On Saturday, 16 January 2016 10:32:58 UTC+2, Richard Evans wrote:

Richard Evans

unread,
Jan 17, 2016, 2:29:29 AM1/17/16
to tiddl...@googlegroups.com
Thank you for your suggestion Eric, it moves things forward a little, but still does not achieve what I want.
What I get now is:

As you can see initial text is a link, but it links to tiddlers that do not exist. The progess tags are not displayed.


Richard Evans

unread,
Jan 17, 2016, 2:37:26 AM1/17/16
to tiddl...@googlegroups.com
Thank you Matabele,

Your suggestion gives me:

  • UseCase1 – Use Case – 1st Pass
  • UseCase2 – Use Case – 1st Pass
  • UseCase3 – Use Case
  • UseCase4 – Use Case
  • UseCase5 – Use Case – FIXME

Again no links and all the tags are displayed, not just the ones I am interested in, this is essentially the same result as Jed's suggestion.


Matabele

unread,
Jan 17, 2016, 3:29:04 AM1/17/16
to TiddlyWiki
Hi Richard

To linkify the tiddler titles, add a $link widget like so:

<ul><$list filter="[tag[mytag]]">
<li>

<$link><
<currentTiddler>></$link><$list filter="[is[current]list[!!tags]]" variable="tag"> -- <<tag>></$list>
</li>
</$list>
</ul>

Displaying only some of the tags is tricky; this was one of my reasons for abandoning tags in favour of fields for the demo here. Whilst the tags may be cycled in the same field (or the 'tags' field) -- to display only the current tag as the button label is much simpler using separate fields for each cycled item.

Another advantage of separate field for recording the status; that macros and buttons can customise their actions according to the value of these fields.

regards

Richard Evans

unread,
Jan 17, 2016, 5:16:35 AM1/17/16
to tiddl...@googlegroups.com
Yes, Thank you Matabele.

Reply all
Reply to author
Forward
0 new messages