Everything in TW is built from tiddlers. It’s tiddlers all the way down. There is no shame in using tiddlers to build a checklist. A solution based on parsing the text of a tiddler is going to be a bit fragile or limited. Tags are the most natural way to build hierarchical structures – like sublists.
So pull a couple definitions out of the toc macros and roll your own. Tag with $:/tags/Macro:
I haven’t really made much progress on this topic, but by chance today I had the intuition to try something to get closer to having subtasks using the $__plugins_tw-FRed_tw5-checklist, and the result isn’t bad.
This is the text I put in the tiddler:
[ ] Garden tasks
<<<
[ ] Dig
[x] Cover holes in the wall where the mice come out
<<<
[x] Shed tasks
<<<
[x] Clean the car
[x] Organize the tools
<<<
Yes, I’ve seen that. I’ll have to look at the code to see if I can adapt it. The more alternatives we have, the easier it will be to find the one that best fits our projects.
I like the TOC approach, and made a minor adjustment in case anyone else wants to use it.
Below is a modification that allows you to choose the checked tag that is applied. I don’t think there are any issues with what I’ve added. For the time being, I’m going to experiment with adding the ability to choose multiple tags upon being checked or showing a specific field over the title, just haven’t quite figured that out yet lol
Find the toc-caption macro in the core tiddlers and copy it into your working macros. Change the name to toc-field (or whatever) and then change the reference to <<toc-caption>> in the toc-body-checkbox macro to <<toc-field>> . Make appropriate changes toc-field to use your preferred field.
ohh, so I thought it was there but I couldn’t get it to work and figured I was misreqding it, turns out I misspelled caption when setting which field heh, oops.
I wonder if using [ ] [ ] etc could be used to indicate nesting. Or perhaps a similar looking Unicode character. I already have an editor toolbar button to add remove [ ] from selected lines in a tiddler. Similarly I modified the autolist plugin so <enter> on a line with some wikitext indicators, continues the prefix on the next line.
A way to add items like with $:/plugins/tgrosinger/tw5-checklist
Since this example hoopy-wiki allows one to delete items, a small improvment may be the ability to click to excise to a tiddler with templated tag/fields.
I imagin it would use the current tiddler as a tag, so we could also list such excised to do items, perhaps replacing them with a macro link, and determining the status from the tiddler.