Issue with: TOC-macros Rewritten

Mario,

I have an application for the new toc macros, a wiki for a Book I am writting.

Specificaly I have projectify projects listed in the contents, and I want to hide todo items below a project that have the done tag.

Questions;

  • Is wip-toc-rewrite.tiddlyhost.com the appropriate source?
  • Is this topic the documentation?
  • Is instalation simply dragging $:/core/macros/toc to the target wiki?

[edited]

I just added a toc-filter on a project tiddler [tag<currentTiddler>!tag[done]!has[draft.of]] and I am still seeing the done items.

Thanks in advance
Tones

It is not ready for prime time. I did have a look and the “wip-” version is not up to date. I’ll have to have a closer look at the source.

It should be a drop-in replacement, once the docs is done.

The core TaskManagementExample at tw-com works for me. Can you be more specific – A little JSON with some example tiddlers to play with.

Edit: Latest version is at: TiddlyWiki v5.4.0-prerelease — a non-linear personal web notebook

1 Like

@pmario I will be on the road until Monday, but I have attempted to use the latest macro set on tiddlywiki.com. Here is a package of example tiddlers including the toc macros, that is not working.

testing-new-toc.json (24.8 KB)

I have tried a number of different filters to be sure I am correctly reading your instructions at the top of this topic. In this test data, in the contents tab “Project name” should have 2 todo items listed excluding “Project to do 2” which has the done tag.

Thanks for the feedback. There seem to be 2 problems.

  • I did only test with toc-hide:yes and not a filter … so it seems the filter is not used
  • It should be enough that toc-filter has a !tag[done], but it seems toc-filter is not active

That’s why I need to create much more test-cases. They serve 2 purposes. They can show problems and they also serve as examples. I’ll see, what I can do at the weekend

1 Like

I am here to be a tester too. let me know if I can help.

thanks mario

The problem was the documentation. Sorry.

  1. For toc-hide adding the :add filter run prefix in the docs was wrong. It seems I did not fix the docs.
  2. The toc-filter needs to use the <tag> variable instead of the <currentTiddler> variable.

I did update the docs in in the OP thread and I’ll create a valid docs in the preview when there is time.

So currently the toc-macros behave more like the tabs macro, where we need to use currentTab instead of currentTiddler.

For your example only the toc-filter with [tag<tag>!tag[done]!is[draft]] is enough to create the right list.

I’ll have a closer look at the code. May be we should use currentTag – So the filter would be
[tag<currentTag>!tag[done]...]

Thanks for testing!
-m

2 Likes

Perhaps since we need not use tags with the advance features you could call this variable currentTitle?

  • [tag<currentTitle>!tag[done]!is[draft]]

Or otherwise if not using tagging.

[Edited] For now I used [tag<tag>!tag[done]!is[draft]!sort[created]]

This has lost its link to the solution - the published solution