Listed Operator and shadow tiddlers

Hello. I have some tiddlers with example in category field. On my main wiki the following will list them all

<ul>
<$list filter="[[example]listed[category]]">
<li><$link/></li>
</$list>
</ul>

Now when include these tiddlers in a plugin with the excellent Gatha plugin, the above code no longer shows the (now shadow) tiddlers. I assume [[example]listed[category]] only returns non-shadow tiddlers. Is there any way to make it include shadow tidllers as well? I attached a test plugin for experiment.

plugin_pak_test-example-sheet_v0.0.0_20220418.json (1.2 KB)

Try this:

[all[shadows+tiddlers]contains:category[example]]

As you correctly surmised the listed[] operator does not look inside shadow tiddlers, so approaching the problem from the other end does the trick.

1 Like

Ahh. Thank you. This indeed does the trick. So contains:category[example] is more versatile than [example]listed[category] since the latter is a constructor that only looks for regular tiddlers whereas the first we have more control over what kind of tiddlers to look for :slight_smile:

To be clear the default to all filters we need not specify is [all[] so when we need to also access shadow tiddlers we use [all[shadows+tiddlers]]of course if a shadow is edited it’s “tiddler” will be the one returned not the shadow.

Otherwise working code needs to be updated to include shadow tiddlers if being packaged into a plugin because they become shadows.

1 Like