filtering tags

118 views
Skip to first unread message

Stefan Riedl

unread,
Aug 13, 2018, 7:00:13 AM8/13/18
to TiddlyWiki
Hello!

I am pretty new to Tiddly Wiki and my skills in programming and syntax point towards zero :( So I encountered a problem I tried but failed to solve.

In my wiki I have a lot of tiddlers and many different tags. For better overview I loaded a plugin that looks like this:



Find tiddlers tagged with:

<$select tiddler="$:/temp/tag1">
  <$list filter="[all[]tags[]sort[]]">
      <option value=<<currentTiddler>>><<currentTiddler>></option>
   </$list>
</$select>
and
<$select tiddler="$:/temp/tag2">
   <$list filter="[all[]tags[]sort[]]">
      <option value=<<currentTiddler>>><<currentTiddler>></option>
   </$list>
</$select>

Found <$count filter="[tag{$:/temp/tag1}tag{$:/temp/tag2}]" /> matching tiddlers:

<$list filter="[tag{$:/temp/tag1}tag{$:/temp/tag2}]">
   <li><$link><<currentTiddler>></$link></li>
</$list>


It gives me two dropdown menues with all the tags in my wiki. I can select two different tags and all the relevant tiddlers will be listed listed below.


What I like to have now, is a filter for the tags though. I would like to have just a selection of tags in both dropdown menues.


I guess there is some kind filter for this problem, but I couldn't figure out the right syntax and make it work.

Can anybody help me?



Mark S.

unread,
Aug 13, 2018, 10:06:35 AM8/13/18
to TiddlyWiki


On Monday, August 13, 2018 at 4:00:13 AM UTC-7, Stefan Riedl wrote:
What I like to have now, is a filter for the tags though. I would like to have just a selection of tags in both dropdown menues.



It sounds like you want a subset of the current tags. So, the question is, what criteria do you have for the subset ?

-- Mark

TonyM

unread,
Aug 13, 2018, 10:07:36 AM8/13/18
to TiddlyWiki
Stephan,

As I read it the final list shows all tiddlers according to your selection. And it depends on the two tags you select.

Is the count and resulting list what you expect?

What additional filtering do you want?

Additional filter opperators can be set in the tag selection or in the final listing. If you are not yet understanding how to use filters you will need to give a little more info.

How would you like the result to be different?

Regards
Tony

TonyM

unread,
Aug 13, 2018, 10:28:28 AM8/13/18
to TiddlyWiki
Mark,

What time zone are you in wheree are you?

I should be in bed

Its after midnight here in sydney.

Regards
Tony

@TiddlyTweeter

unread,
Aug 13, 2018, 12:25:24 PM8/13/18
to TiddlyWiki
I know people in Sydney who are awake that could ring you. What's your number? :-) (do NOT send it :)

Stefan Riedl

unread,
Aug 13, 2018, 1:56:52 PM8/13/18
to TiddlyWiki
First, thanks for the replies. And yes, the syntax and filter logic is all new and confusing to me. 

What I want is a filtering of the tags, so the dropdown menue shows me just specific tags. 

My wiki is a kind of city guide for RPG. Every tiddler describes a location in a city and is taged  with an area (like "Harbor Distict") and a loaction type (like "Shop"). 

The script I use now shows me all the given  tags. But I want just the areas in one selector, and the location types in the other selector. So I guess the filter has to go there. I couldn't find a sytanx that worked though :(

Mark S.

unread,
Aug 13, 2018, 2:20:28 PM8/13/18
to TiddlyWiki
If you have a tiddler say called "Location", and then tiddlers that are also tags like "Harbor District", "Upper City", etc., then you can make a filter like:

[[Location]tagging[]]

which will show just the tags that are used for Location. Repeat for Location-Type.

-- Mark

Stefan Riedl

unread,
Aug 14, 2018, 12:42:35 AM8/14/18
to TiddlyWiki
Mh, cant get it working, but thanks anyway :)

TonyM

unread,
Aug 14, 2018, 2:13:12 AM8/14/18
to TiddlyWiki
Stephan,

I think all you need to do is build a filter to list what you want. Tell us and we can help. But see here where I simply replaced the "all[]tags[]" part of the filter

<$select tiddler="$:/temp/tag1">
  <$list filter="[prefix[$:/tags]sort[]]">
      <option value=<
<currentTiddler>>><<currentTiddler>></option>
   </$list>
</$select>

<$select tiddler="$:/temp/tag3">
  <$list filter="[tag[$:/tags/ViewTemplate]sort[]]">
      <option value=<
<currentTiddler>>><<currentTiddler>></option>
   </$list>
</$select>

Regards
Tony
Reply all
Reply to author
Forward
0 new messages